FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lib: do not access process.noDeprecation at build time by joyeecheung · Pull Request #51447 · nodejs/node · GitHub

/ node Public

lib: do not access process.noDeprecation at build time - #51447

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
joyeecheung:no-deprecate
Feb 26, 2024
Merged

lib: do not access process.noDeprecation at build time#51447
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
joyeecheung:no-deprecate

Conversation

Copy link
Copy Markdown
Member

Delay access at run time otherwise the value is captured at build time and always false.

nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Jan 13, 2024
joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 13, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 13, 2024

Copy link
Copy Markdown
Collaborator

targos commented Jan 13, 2024

Copy link
Copy Markdown
Member

Can you add a test ?

Comment thread lib/internal/fs/utils.js Outdated
Comment thread lib/internal/util.js Outdated
joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 16, 2024
targos previously requested changes Jan 16, 2024

targos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can you add a test ?

github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 16, 2024

Copy link
Copy Markdown
Collaborator

joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 22, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 22, 2024

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Member Author

Can you add a test ?

@targos I don't think we can reliably test this because this requires accessing something that we are not supposed to access in the snapshot i.e. before the test is run.

targos dismissed their stale review February 1, 2024 13:06

addressed

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Delay access at run time otherwise the value is captured at build
time and always false.

Copy link
Copy Markdown
Collaborator

Comment thread lib/internal/fs/utils.js
function emitRecursiveRmdirWarning() {
if (recursiveRmdirWarned === undefined) {
// TODO(joyeecheung): use getOptionValue('--no-deprecation') instead.
recursiveRmdirWarned = process.noDeprecation;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

recursiveRmdirWarned = recursiveRmdirWarned || process.noDeprecation;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think that would make the code harder to understand when we are lazily initializing a boolean.

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Member

#51813 failed across multiple PRs.

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 22, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 22, 2024

Copy link
Copy Markdown
Collaborator

joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 25, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 25, 2024

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 26, 2024
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 26, 2024
nodejs-github-bot merged commit 9ac98b1 into nodejs:main Feb 26, 2024

Copy link
Copy Markdown
Collaborator

Landed in 9ac98b1

marco-ippolito pushed a commit that referenced this pull request Feb 26, 2024
Delay access at run time otherwise the value is captured at build
time and always false.

PR-URL: #51447
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
marco-ippolito pushed a commit that referenced this pull request Feb 27, 2024
Delay access at run time otherwise the value is captured at build
time and always false.

PR-URL: #51447
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
marco-ippolito mentioned this pull request Mar 1, 2024
richardlau pushed a commit that referenced this pull request Mar 25, 2024
Delay access at run time otherwise the value is captured at build
time and always false.

PR-URL: #51447
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
richardlau mentioned this pull request Mar 25, 2024
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

Labels

fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL