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: remove shadowed variable in OptionsParser::Parse #46672

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

codebytere
Copy link
Member

Chromium enabled -Wshadow in https://chromium-review.googlesource.com/c/chromium/src/+/3860569, which meant that this code caused compilation issues in Electron.

Fix this with name change.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 15, 2023
@addaleax
Copy link
Member

Is there a possibility Electron could build Node.js (or Chromium) with a different set of warnings? This is more of a stylistic warning than anything else, and unless Node.js also starts adopting this warning (and probably similar ones in the future), you might end up doing a lot of changes like this.

@RaisinTen
Copy link
Contributor

Electron already builds Node.js with a different set of warnings like enabling -Wno-shadow - https://github.com/electron/electron/blob/fdab0799fedbb61db31c73d4f56b03347d353e36/patches/node/build_add_gn_build_files.patch#L266-L275 which was added as a part of the chromium upgrade (electron/electron#31986) in electron/electron@5a1dedf which links to https://chromium-review.googlesource.com/c/chromium/src/+/3276279. Might be a good idea to adopt this option so that we don't face issues like the one described in https://chromium-review.googlesource.com/c/chromium/src/+/3860569 in the future.

@codebytere codebytere added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 28, 2023
@codebytere
Copy link
Member Author

@addaleax fair point, though it remains fairly rare we do at the moment! in agreement with @RaisinTen above, i'd be interested in modifying a few warnings Node.js builds with to mitigate these kinds of issues: for ex. enabling -Wno-shadow. Is that something you'd be open to?

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 28, 2023
@nodejs-github-bot
Copy link
Collaborator

@addaleax
Copy link
Member

@codebytere No strong feelings in any direction here, but I’m definitely on board with adding -Wno-shadow to the Node.js build config since it shouldn’t make any difference for the default Node.js build

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@codebytere codebytere added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. and removed needs-ci PRs that need a full CI run. labels Mar 1, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 1, 2023
@nodejs-github-bot nodejs-github-bot merged commit 97d0f77 into nodejs:main Mar 1, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 97d0f77

targos pushed a commit that referenced this pull request Mar 13, 2023
PR-URL: #46672
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
targos pushed a commit that referenced this pull request Mar 14, 2023
PR-URL: #46672
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
PR-URL: #46672
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
codebytere added a commit to electron/electron that referenced this pull request Apr 14, 2023
codebytere added a commit to electron/electron that referenced this pull request Apr 17, 2023
codebytere added a commit to electron/electron that referenced this pull request Apr 18, 2023
* chore: bump node in DEPS to v18.16.0

* build,test: add proper support for IBM i

nodejs/node#46739

* lib: enforce use of trailing commas

nodejs/node#46881

* src: add initial support for single executable applications

nodejs/node#45038

* lib: do not crash using workers with disabled shared array buffers

nodejs/node#41023

* src: remove shadowed variable in OptionsParser::Parse

nodejs/node#46672

* src: allow embedder control of code generation policy

nodejs/node#46368

* src: allow optional Isolate termination in node::Stop()

nodejs/node#46583

* lib: fix BroadcastChannel initialization location

nodejs/node#46864

* chore: fixup patch indices

* chore: sync filenames.json

* fix: add simdutf dep to src/inspector BUILD.gn

- nodejs/node#46471
- nodejs/node#46472

* deps: replace url parser with Ada

nodejs/node#46410

* tls: support automatic DHE

nodejs/node#46978

* fixup! src: add initial support for single executable applications

* http: unify header treatment

nodejs/node#46528

* fix: libc++ buffer overflow in string_view ctor

nodejs/node#46410

* test: include strace openat test

nodejs/node#46150

* fixup! fixup! src: add initial support for single executable applications

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. 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.

6 participants