Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: move and update comment about 'node.js' compilation. #7277

Closed

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Jun 12, 2016

Checklist
  • make -j4 test (UNIX) or vcbuild test nosign (Windows) passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

src

Description of change

Currently the comment regarding execution of src/node.js seems to refer
to the file before the refactorings done in ec6af31. Also, it looks like
the comment itself might have "drifted" a little in the file.

Updated the comment to refer to the lib/internal/bootstrap_node.js file,
moved it closer to the compilation step, and updated the name that is
generated in node_natives.h.

Currently the comment regarding execution of src/node.js seems to refer
to the file before the refactorings done in ec6af31. Also, it looks like
the comment itself might have "drifted" a little in the file.

Updated the comment to refer to the lib/internal/bootstrap_node.js file,
moved it closer to the compilation step, and updated the name that is
generated in node_natives.h.
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jun 12, 2016
@@ -3261,6 +3258,9 @@ void LoadEnvironment(Environment* env) {
// are not safe to ignore.
try_catch.SetVerbose(false);

// Compile, execute the lib/internal/bootstrap_node.js file. (Which was
// included as static C string in node_natives.h.
// 'internal_bootstrap_node_native is the string containing that source code.)
Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(), "node.js");
Copy link
Contributor

@mscdex mscdex Jun 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this script name should be updated too since it has been named bootstrap_node.js for some time now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to updating this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a stab at changing this to bootstrap_node.js.

@@ -3261,6 +3258,9 @@ void LoadEnvironment(Environment* env) {
// are not safe to ignore.
try_catch.SetVerbose(false);

// Execute the lib/internal/bootstrap_node.js file which was included as a
// static in node_natives.h by node_js2c. 'internal_bootstrap_node_native'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static -> static C string

@cjihrig
Copy link
Contributor

cjihrig commented Jun 14, 2016

Don't forget about #7277 (comment)

@@ -3261,7 +3261,8 @@ void LoadEnvironment(Environment* env) {
// Execute the lib/internal/bootstrap_node.js file which was included as a
// static in node_natives.h by node_js2c. 'internal_bootstrap_node_native'
// is the string containing that source code.
Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(), "node.js");
Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(),
"bootstrap_node.js");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you line up the opening " with the e in env on the previous line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, move it now.

@mscdex
Copy link
Contributor

mscdex commented Jun 14, 2016

@@ -3261,7 +3258,11 @@ void LoadEnvironment(Environment* env) {
// are not safe to ignore.
try_catch.SetVerbose(false);

Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(), "node.js");
// Execute the lib/internal/bootstrap_node.js file which was included as a
// static in node_natives.h by node_js2c. 'internal_bootstrap_node_native'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static -> static C string

@cjihrig
Copy link
Contributor

cjihrig commented Jun 15, 2016

The CI had a Jenkins failure, and some Alpine failures which have since been corrected. LGTM

@mscdex
Copy link
Contributor

mscdex commented Jun 15, 2016

LGTM

@danbev
Copy link
Contributor Author

danbev commented Jun 16, 2016

@cjihrig @mscdex Thanks for the reviews!

cjihrig pushed a commit that referenced this pull request Jun 17, 2016
This commit updates the node.js script name to reflect its
actual name, which is now bootstrap_node.js. This commit also
fixes the requisite message tests, and relocates a comment
which seems to have drifted.

PR-URL: #7277
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
@cjihrig
Copy link
Contributor

cjihrig commented Jun 17, 2016

Landed in 81b6882. Thanks!

@cjihrig cjihrig closed this Jun 17, 2016
evanlucas pushed a commit that referenced this pull request Jun 27, 2016
This commit updates the node.js script name to reflect its
actual name, which is now bootstrap_node.js. This commit also
fixes the requisite message tests, and relocates a comment
which seems to have drifted.

PR-URL: #7277
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
@Fishrock123 Fishrock123 mentioned this pull request Jun 27, 2016
@Fishrock123 Fishrock123 mentioned this pull request Jul 5, 2016
@MylesBorins
Copy link
Contributor

@cjihrig lts?

@cjihrig
Copy link
Contributor

cjihrig commented Jul 12, 2016

No, I believe this is accurate in v4.

@danbev danbev deleted the move-and-update-node.js-source-compilation branch September 7, 2016 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants