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

node: Update strings node.js -> bootstrap_node.js #5962

Closed
wants to merge 1 commit into from

Conversation

joshgav
Copy link
Contributor

@joshgav joshgav commented Mar 30, 2016

Pull Request check-list

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with
    this change (including linting)?
  • Is the commit message formatted according to [CONTRIBUTING.md][0]?
  • If this change fixes a bug (or a performance problem), is a regression
    test (or a benchmark) included?

Affected core subsystem(s)

node.cc

Description of change

Update filename in node.cc and tests to bootstrap_node.js per #5103 and update nearby comments. Fixed some other comments while I was at it.

Will need to rebase once #5881 lands.

@evanlucas
Copy link
Contributor

/cc @Fishrock123

@Fishrock123 Fishrock123 added the lib / src Issues and PRs related to general changes in the lib or src directory. label Mar 30, 2016
at startup (node.js:*:*)
at node.js:*:*
at startup (bootstrap_node.js:*:*)
at 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.

curious that the message tests pass without this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

Guessing it was ExecuteString() setting the script name to node.js.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, ExecuteString calls v8::Script::Compile which allows us to specify the ScriptOrigin, which comes from the FIXED_ONE_BYTE_STRING I changed. grep ExecuteString ./src/* -r says it isn't called anywhere else, perhaps ExecuteString should be merged into LoadEnvironment?

@Fishrock123
Copy link
Contributor

These commits need to be separate PRs.

@Fishrock123 Fishrock123 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Mar 30, 2016
@Fishrock123
Copy link
Contributor

I'm also pretty sure this is a breaking change, cc @nodejs/ctc

Is this 100% necessary, even if previously it was now not technically correct?

@cjihrig
Copy link
Contributor

cjihrig commented Mar 30, 2016

@joshgav was the set_trace_sync_io part causing any problems anywhere? If so, can you provide a test case?

Clarify comments re invoking bootstrap_node.js.
Fix filename to bootstrap_node.js per nodejs#5103.
Fix tests `node.js` -> `bootstrap_node.js`
Fix comment on why we check the loop again before exiting.
`context-inl.h` -> `env-inl.h`
@joshgav joshgav changed the title node: Update strings, fix --trace-sync-io. node: Update strings node.js -> bootstrap_node.js Mar 30, 2016
@joshgav
Copy link
Contributor Author

joshgav commented Mar 30, 2016

moved --trace-sync-io fix to its own PR #5964, will provide a test there

@joshgav
Copy link
Contributor Author

joshgav commented Mar 30, 2016

@Fishrock123 would internal/bootstrap_node.js be better than just bootstrap_node.js? It seems to have the same effect, might as well get it right now. IMO the reason to fix this is to help people when debugging, so the internal prefix would probably be best.

@Fishrock123
Copy link
Contributor

cc @nodejs/ctc

I think leaving it alone would probably be o.k., but if it should be changed that's fine.

It shouldn't contain the path though, no internal/, it's just representative of the filename. Any file search will pull it out pretty easily. (searching for node.js shows boostrap_node.js in my editor' file finder)

@cjihrig
Copy link
Contributor

cjihrig commented Mar 31, 2016

Is the question whether or not internal/ should appear in the stack traces? If so, I think it should be in there.

@joshgav
Copy link
Contributor Author

joshgav commented Mar 31, 2016

The question is two-fold:

  1. Do we leave the traced script name as is - i.e. node.js - and somehow document that the actual script is at ./lib/internal/bootstrap_node.js.
  2. If we change the traced script name, do we use internal/bootstrap_node.js or bootstrap_node.js.

Personally I prefer including internal/ cause it helps with following the traces.

@Fishrock123 Do we have the option of perhaps renaming as internal/node.js (i.e. remove bootstrap_)? That might make option 1 above more palatable.

@cjihrig
Copy link
Contributor

cjihrig commented Mar 31, 2016

IMO we should update it to most accurately reflect reality if possible.

@Fishrock123
Copy link
Contributor

Is this only exposed to error logs? I am relatively concerned we might be breaking something because I'm not entirely sure what this changes.

CI: https://ci.nodejs.org/job/node-test-pull-request/2149/

citgm: https://ci.nodejs.org/job/thealphanerd-smoker/177/

@estliberitas estliberitas force-pushed the master branch 2 times, most recently from 7da4fd4 to c7066fb Compare April 26, 2016 05:23
@joshgav joshgav closed this May 9, 2016
@joshgav joshgav deleted the joshgav-dev branch May 9, 2016 17:51
@joshgav
Copy link
Contributor Author

joshgav commented May 9, 2016

I moved this fix to another branch in my fork; if we want to continue the discussion let me know and I'll open a corresponding new PR. Thanks!

@Fishrock123
Copy link
Contributor

Oh shoot

I guess? we should do this but I'm not the best person to ask about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants