ci: upgrade to Node 20 for Windows long path support#3645
Open
ramsessanchez wants to merge 3 commits into
Open
ci: upgrade to Node 20 for Windows long path support#3645ramsessanchez wants to merge 3 commits into
ramsessanchez wants to merge 3 commits into
Conversation
Node.js 18 does not include the 'longPathAware' manifest flag in its executable, which means the Windows LongPathsEnabled registry key has no effect. Node.js 20+ ships with this manifest flag, enabling proper long path support (>260 chars) when combined with the registry key. Changes: - Upgrade Node from 18.x to 20.x in install-tools.yml - Set RUSH_ALLOW_UNSUPPORTED_NODEJS=1 for the Rush Build step - Add -AllowUnsupportedNode to all GenerateModules.ps1 invocations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The parameter was being passed from the pipeline YAML but did not exist in the script on main. Adds the switch parameter and sets RUSH_ALLOW_UNSUPPORTED_NODEJS=1 when specified, allowing Rush to run on Node 20+. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Problem
The CI build fails with \ENOENT\ errors on generated files with paths exceeding 260 characters (e.g., the Reports module has paths ~309 chars long). The previously added
eg add\ for \LongPathsEnabled\ had no effect.
Root Cause
The Windows \LongPathsEnabled\ registry key only works for applications that declare \longPathAware\ in their PE manifest. Node.js 18 does not include this flag — it was added in Node.js 20. Since autorest (which generates the C# files) runs on Node.js, the registry key was silently ignored.
Fix
Risk
Low — Node 20 is backward-compatible with 18 for the npm/rush/autorest ecosystem. The autorest.powershell packages declare \�ngines.node: >=10.12.0\ with no upper bound. If any issue arises, it would manifest as an immediate build failure (not a subtle regression).