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

[v12.x] backport #27224 as semver-patch #27483

Closed
wants to merge 2 commits into from

Conversation

BridgeAR
Copy link
Member

The actual breaking changes in #27224 have been reverted here in a way that most code was possible to being backported.

This is necessary to reduce conflicts in our release lines. #27224 was the first semver-major to land after the v12 cut-off and thus it should also be the first to be backported. This is a trial run since without such backports it becomes increasingly difficult to put together releases after a while.

// cc @nodejs/releasers

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

This caches the current working directory and only updates the variable
if `process.chdir()` is called.

PR-URL: nodejs#27224
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This makes sure nodejs#27224 is possible
to being backported in a semver-patch way.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added process Issues and PRs related to the process subsystem. v12.x worker Issues and PRs related to Worker support. labels Apr 29, 2019
@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 30, 2019
@nodejs-github-bot
Copy link
Collaborator

const originalCwd = process.cwd;

process.cwd = function() {
cachedCwd = originalCwd();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we have a proper convention around this, but I'd add a comment explaining this is only for v12.x to reduce conflicts - this is where the difference between the two branches lie so it'll create conflicts when future commits touch here anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

I struggle finding brief words describing this. I could just add // Backwards compatibility patch: removed code to prevent breaking change..

I personally do not think it would be bad without the comment, since we just work on master and people backporting code should see the compatibility commit.

@@ -32,9 +38,15 @@ function wrapProcessMethods(binding) {
return binding.umask(mask);
}

function cwd() {
cachedCwd = binding.cwd();
Copy link
Member

Choose a reason for hiding this comment

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

Similarly I'd add a comment here.

@targos
Copy link
Member

targos commented May 5, 2019

Landed in 91b7f5e and 826fb66

@targos targos closed this May 5, 2019
targos pushed a commit that referenced this pull request May 5, 2019
This caches the current working directory and only updates the variable
if `process.chdir()` is called.

PR-URL: #27224
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Backport-PR-URL: #27483
targos pushed a commit that referenced this pull request May 5, 2019
This makes sure #27224 is possible
to being backported in a semver-patch way.

PR-URL: #27483
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
@targos targos mentioned this pull request May 6, 2019
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. process Issues and PRs related to the process subsystem. worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants