Skip to content

Remove FEATURE_NODE_REUSE conditional; always enable node reuse.#13209

Merged
MichalPavlik merged 2 commits intomainfrom
dev/mipavlik/remove-node-reuse-compiler-condition
Feb 19, 2026
Merged

Remove FEATURE_NODE_REUSE conditional; always enable node reuse.#13209
MichalPavlik merged 2 commits intomainfrom
dev/mipavlik/remove-node-reuse-compiler-condition

Conversation

@MichalPavlik
Copy link
Copy Markdown
Member

Simple Friday PR :) Just removing the FEATURE_NODE_REUSE constant since node reuse should be available everywhere anyway.

This change removes the FEATURE_NODE_REUSE compilation symbol and all related conditional code, making node reuse logic unconditional throughout the codebase. The /nodereuse switch and its tests are now always available, and build configuration is simplified by eliminating the symbol from Directory.BeforeCommon.targets.

Copilot AI review requested due to automatic review settings February 6, 2026 13:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the FEATURE_NODE_REUSE conditional compilation symbol, making node reuse functionality always available throughout the MSBuild codebase. Node reuse is a feature that allows worker node processes to stay idle in the background and be reused by multiple build requests, improving build performance.

Changes:

  • Removed FEATURE_NODE_REUSE from build configuration (Directory.BeforeCommon.targets)
  • Made node reuse logic unconditional in XMake.cs, removing conditional initialization and validation
  • Enabled the /nodereuse command-line switch unconditionally in CommandLineSwitches.cs
  • Unconditionally enabled node reuse tests in CommandLineSwitches_Tests.cs
  • Removed conditional compilation directives from NodeProviderOutOfProcBase.cs and BuildParameters.cs

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Directory.BeforeCommon.targets Removed FEATURE_NODE_REUSE from DefineConstants for both .NET Framework and .NET Core targets
src/MSBuild/XMake.cs Made enableNodeReuse default to true unconditionally; removed conditional compilation logic and related comments
src/MSBuild/CommandLine/CommandLineSwitches.cs Made nodereuse switch always available by removing conditional compilation
src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs Enabled node reuse parameter identification and processing tests unconditionally
src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs Made node reuse connection logic unconditional
src/Build/BackEnd/BuildManager/BuildParameters.cs Made _enableNodeReuse field default to true unconditionally

@MichalPavlik MichalPavlik merged commit 1359d4d into main Feb 19, 2026
10 checks passed
@MichalPavlik MichalPavlik deleted the dev/mipavlik/remove-node-reuse-compiler-condition branch February 19, 2026 14:29
JanProvaznik pushed a commit to JanProvaznik/msbuild that referenced this pull request Feb 25, 2026
…net#13209)

Simple Friday PR :) Just removing the FEATURE_NODE_REUSE constant since
node reuse should be available everywhere anyway.

This change removes the FEATURE_NODE_REUSE compilation symbol and all
related conditional code, making node reuse logic unconditional
throughout the codebase. The /nodereuse switch and its tests are now
always available, and build configuration is simplified by eliminating
the symbol from Directory.BeforeCommon.targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants