dotnet / dotnet/sdk

dotnet CLI commands that modify the 'immutable' state should kill/invalidate build servers

Open
#56,045 0 comments 0 reactions 0 assignees View on GitHub
Area-CLI Area-dotnet AOT Area-dotnetup Area-MSBuild untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

The MSBuild Server, which is now the default execution mode, can be used to cache build states of various kinds - for example project evaluations, SDK Resolver results, and loaded XML data from workloads, SDKs/Targets, etc.

This so-called 'immutable' data can become stale. Ideally the Server mode would be able to track the roots of such immutable data and invalidate it itself, but until that happens it could be useful for commands that knowingly mutate this 'immutable state' to force invalidation. The way we do this today is through `dotnet build-server shutdown`.

* workload updates
* dotnetup runtime installs

these mechanisms should shut down the build servers to ensure that no stale data is kept. When MSBuild server would be used by the CLI, they should run `dotnet build-server shutdown` at the end of their command implementations.

Part of dotnet/msbuild#14234.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CLI command implementations for workload updates and dotnetup runtime installs, then trace how these commands can invoke `dotnet build-server shutdown`. Done means both mechanisms shut down the build servers at the end of their commands when MSBuild server mode is used, preventing stale immutable state.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.