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: refactor node options parsers to mitigate MSVC bug #26280

Merged
merged 2 commits into from Mar 4, 2019

Conversation

Projects
8 participants
@refack
Copy link
Member

commented Feb 23, 2019

Simplify node_options API, so the compiler bug should not manifest.
Should fix current master
Fixes: #25593

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@nodejs-github-bot

This comment has been minimized.

Copy link

commented Feb 23, 2019

@refack sadly an error occured when I tried to trigger a build :(

@refack

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2019

@Trott

This comment has been minimized.

Copy link
Member

commented Feb 23, 2019

@nodejs/build @nodejs/platform-windows This is supposed to fix the current Windows CI problem.

@refack

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2019

Still a WIP...
Now there's a problem with the x64 build 🤦‍♂️

@refack

This comment has been minimized.

@refack

This comment has been minimized.

Copy link
Member Author

commented Feb 24, 2019

@seishun

This comment has been minimized.

Copy link
Member

commented Feb 24, 2019

Why is this necessary? Isn't #25593 already fixed?

@refack

This comment has been minimized.

Copy link
Member Author

commented Feb 24, 2019

Why is this necessary? Isn't #25593 already fixed?

As you predicted the fix in #25596 was temporary, and the issue came back. The current code in master when compiled for ia32 results in a broken binary.

For example https://nodejs.org/download/nightly/v12.0.0-nightly201902247e0ddf66b9/win-x86/
image

Resume: https://ci.nodejs.org/job/node-test-commit/26108/

@addaleax

This comment has been minimized.

Copy link
Member

commented Feb 25, 2019

If the issue is still a static initialization order thing, It's not obvious to me how some of the changes here (e.g. to node_worker.cc, .begin()std::begin(), header include order) relate to the issue at hand.

Other than that, the code changes here look good to me. It's unfortunate that the code has to be bloated up a bit, but it's clear that fixing a broken build is more important.

Do we know what change caused this? Should that have gotten a red CI? (Or is it still only debug builds?)

I also can't reproduce this locally on Windows on master, neither with Debug nor Release builds, but I can also only build for ia32 from x64, so maybe that's it?

@refack refack force-pushed the refack:mitigate-msvc-compiler-issue branch from 6b14968 to 5cf7ba6 Feb 25, 2019

@refack

This comment has been minimized.

Copy link
Member Author

commented Feb 25, 2019

@joyeecheung
Copy link
Member

left a comment

LGTM with nits

Show resolved Hide resolved src/node_options.cc Outdated
Show resolved Hide resolved src/node_options.h Outdated
Show resolved Hide resolved src/node_options.cc Outdated

@refack refack force-pushed the refack:mitigate-msvc-compiler-issue branch from dc38996 to f3a4e2b Feb 25, 2019

@Trott Trott added the author ready label Feb 25, 2019

Show resolved Hide resolved src/node_options.cc Outdated
Show resolved Hide resolved src/node_worker.cc Outdated

@refack refack self-assigned this Feb 25, 2019

@refack refack force-pushed the refack:mitigate-msvc-compiler-issue branch from f3a4e2b to f98b845 Feb 25, 2019

@refack

This comment has been minimized.

Copy link
Member Author

commented Feb 25, 2019

Rebased into two commits (1) bug fix and (2) fix warnings
CI: https://ci.nodejs.org/job/node-test-pull-request/20993/

@refack refack force-pushed the refack:mitigate-msvc-compiler-issue branch 2 times, most recently from 251a80b to 57e2c03 Feb 26, 2019

refack added a commit to refack/node that referenced this pull request Mar 3, 2019

src: refactor node options parsers to mitigate MSVC bug
PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

refack added a commit to refack/node that referenced this pull request Mar 3, 2019

src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults

PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@refack

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2019

@refack refack force-pushed the refack:mitigate-msvc-compiler-issue branch from 57e2c03 to 2c6d94f Mar 4, 2019

@refack refack removed the request for review from bnoordhuis Mar 4, 2019

@refack refack removed the author ready label Mar 4, 2019

@refack refack merged commit 2c6d94f into nodejs:master Mar 4, 2019

2 checks passed

Travis CI - Branch Build Passed
Details
Travis CI - Pull Request Build Passed
Details

@refack refack deleted the refack:mitigate-msvc-compiler-issue branch Mar 4, 2019

BridgeAR added a commit that referenced this pull request Mar 4, 2019

src: refactor node options parsers to mitigate MSVC bug
PR-URL: #26280
Fixes: #25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

BridgeAR added a commit that referenced this pull request Mar 4, 2019

src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults

PR-URL: #26280
Fixes: #25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

@BridgeAR BridgeAR referenced this pull request Mar 4, 2019

Merged

v11.11.0 proposal #26322

@BridgeAR

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

I had to back out this PR from v11.11.0 due to #26322 (comment).

Should this be backported?

@targos targos added this to Backport requested in v11.x Mar 7, 2019

@refack refack removed their assignment Mar 11, 2019

@refack

This comment was marked as outdated.

Copy link
Member Author

commented Mar 11, 2019

This PR fixes is a compiler bug on Windows (#25593). If that doesn't resurface there is no need to backport.

refack added a commit to refack/node that referenced this pull request Mar 14, 2019

src: refactor node options parsers to mitigate MSVC bug
PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

refack added a commit to refack/node that referenced this pull request Mar 14, 2019

src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults

PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@refack

This comment has been minimized.

Copy link
Member Author

commented Mar 14, 2019

Backport PR: #26649

@refack refack self-assigned this Mar 14, 2019

refack added a commit to refack/node that referenced this pull request Mar 14, 2019

src: refactor node options parsers to mitigate MSVC bug
PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

refack added a commit to refack/node that referenced this pull request Mar 14, 2019

src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults

PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

refack added a commit to refack/node that referenced this pull request Mar 14, 2019

src: refactor node options parsers to mitigate MSVC bug
PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

refack added a commit to refack/node that referenced this pull request Mar 14, 2019

src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults

PR-URL: nodejs#26280
Fixes: nodejs#25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

targos added a commit that referenced this pull request Mar 28, 2019

src: refactor node options parsers to mitigate MSVC bug
Backport-PR-URL: #26649
PR-URL: #26280
Fixes: #25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

targos added a commit that referenced this pull request Mar 28, 2019

src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults

Backport-PR-URL: #26649
PR-URL: #26280
Fixes: #25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

targos added a commit that referenced this pull request Mar 30, 2019

src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults

Backport-PR-URL: #26649
PR-URL: #26280
Fixes: #25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

@BethGriggs BethGriggs referenced this pull request Apr 9, 2019

Merged

v11.14.0 proposal #27163

@refack refack removed their assignment Apr 14, 2019

@targos targos moved this from Backport requested to Backported in v11.x May 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.