bootstrap: use different scripts to setup different configurations#30862
Closed
joyeecheung wants to merge 2 commits intonodejs:masterfrom
Closed
bootstrap: use different scripts to setup different configurations#30862joyeecheung wants to merge 2 commits intonodejs:masterfrom
joyeecheung wants to merge 2 commits intonodejs:masterfrom
Conversation
Member
Author
|
cc @addaleax |
Collaborator
Contributor
|
nit: i think if we decide we really need/want to separate these out, we should stick to more straight-forward filenames for them, such as is_main_thread.js/is_not_main_thread.js and owns_process_state.js/not_owns_process_state.js instead of simply true.js/false.js. |
Member
|
@joyeecheung The C++ linter is failing due to some long lines. |
This patch splits the handling of `isMainThread` and `ownsProcessState` from conditionals in `lib/internal/bootstrap/node.js` into different scripts under `lib/internal/bootstrap/switches/`, and call them accordingly from C++ after `node.js` is run. This: - Creates a common denominator of the main thread and the worker thread bootstrap that can be snapshotted and shared by both. - Makes it possible to override the configurations on-the-fly.
ab3f032 to
a36cad6
Compare
Collaborator
Member
|
Still just one remaining C++ lint failure: 07:10:11 File "src/node.cc" does not use "Boolean" |
Member
Author
|
Oops, sorry, I no longer run the linter locally ever since there's #29918 .. |
Collaborator
Member
Author
|
CI is green. ping @nodejs/process can I have some review please? |
legendecas
reviewed
Dec 16, 2019
jasnell
approved these changes
Dec 18, 2019
legendecas
approved these changes
Dec 19, 2019
joyeecheung
added a commit
that referenced
this pull request
Dec 20, 2019
This patch splits the handling of `isMainThread` and `ownsProcessState` from conditionals in `lib/internal/bootstrap/node.js` into different scripts under `lib/internal/bootstrap/switches/`, and call them accordingly from C++ after `node.js` is run. This: - Creates a common denominator of the main thread and the worker thread bootstrap that can be snapshotted and shared by both. - Makes it possible to override the configurations on-the-fly. PR-URL: #30862 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Member
Author
|
Landed in c63d511 , thanks! |
BridgeAR
pushed a commit
that referenced
this pull request
Jan 3, 2020
This patch splits the handling of `isMainThread` and `ownsProcessState` from conditionals in `lib/internal/bootstrap/node.js` into different scripts under `lib/internal/bootstrap/switches/`, and call them accordingly from C++ after `node.js` is run. This: - Creates a common denominator of the main thread and the worker thread bootstrap that can be snapshotted and shared by both. - Makes it possible to override the configurations on-the-fly. PR-URL: #30862 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Merged
targos
pushed a commit
that referenced
this pull request
Jan 14, 2020
This patch splits the handling of `isMainThread` and `ownsProcessState` from conditionals in `lib/internal/bootstrap/node.js` into different scripts under `lib/internal/bootstrap/switches/`, and call them accordingly from C++ after `node.js` is run. This: - Creates a common denominator of the main thread and the worker thread bootstrap that can be snapshotted and shared by both. - Makes it possible to override the configurations on-the-fly. PR-URL: #30862 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
This patch splits the handling of `isMainThread` and `ownsProcessState` from conditionals in `lib/internal/bootstrap/node.js` into different scripts under `lib/internal/bootstrap/switches/`, and call them accordingly from C++ after `node.js` is run. This: - Creates a common denominator of the main thread and the worker thread bootstrap that can be snapshotted and shared by both. - Makes it possible to override the configurations on-the-fly. PR-URL: #30862 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Merged
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 12, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 12, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 15, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 15, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 18, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 18, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 21, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 21, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 21, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 21, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 24, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 24, 2020
codebytere
added a commit
to electron/electron
that referenced
this pull request
Feb 24, 2020
* chore: bump node in DEPS to v12.16.0 * Fixup asar support setup patch nodejs/node#30862 * Fixup InternalCallbackScope patch nodejs/node#30236 * Fixup GN buildfiles patch nodejs/node#30755 * Fixup low-level hooks patch nodejs/node#30466 * Fixup globals require patch nodejs/node#31643 * Fixup process stream patch nodejs/node#30862 * Fixup js2c modification patch nodejs/node#30755 * Fixup internal fs override patch nodejs/node#30610 * Fixup context-aware warn patch nodejs/node#30336 * Fixup Node.js with ltcg config nodejs/node#29388 * Fixup oaepLabel patch nodejs/node#30917 * Remove redundant ESM test patch nodejs/node#30997 * Remove redundant cli flag patch nodejs/node#30466 * Update filenames.json * Remove macro generation in GN build files nodejs/node#30755 * Fix some compilation errors upstream * Add uvwasi to deps nodejs/node#30258 * Fix BoringSSL incompatibilities * Fixup linked module patch nodejs/node#30274 * Add missing sources to GN uv build libuv/libuv#2347 * Patch some uvwasi incompatibilities * chore: bump Node.js to v12.6.1 * Remove mark_arraybuffer_as_untransferable.patch nodejs/node#30549 * Fix uvwasi build failure on win * Fixup --perf-prof cli option error * Fixup early cjs module loading * fix: initialize diagnostics properly nodejs/node#30025 * Disable new esm syntax specs nodejs/node#30219 * Fixup v8 weakref hook spec nodejs/node#29874 * Fix async context timer issue * Disable monkey-patch-main spec It relies on nodejs/node#29777, and we don't override prepareStackTrace. * Disable new tls specs nodejs/node#23188 We don't support much of TLS owing to schisms between BoringSSL and OpenSSL. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bootstrap: use different scripts to setup different configurations
This patch splits the handling of
isMainThreadandownsProcessStatefrom conditionals inlib/internal/bootstrap/node.jsinto different scripts underlib/internal/bootstrap/switches/, and call them accordinglyfrom C++ after
node.jsis run.This:
thread bootstrap that can be snapshotted and shared by
both.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes