dotnet / dotnet/project-system

Re-enabling the fast up-to-date check doesn't populate correct state until project reload

Open
#7,962 0 comments 0 reactions 1 assignee Claimed by @drewnoakes View on GitHub
Feature-Up-to-date Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

## Steps to Reproduce

1. Enable verbose fast up-to-date logging
2. Create a console app
3. Build twice and notice the (second) log output
4. Add `true` to the project file
5. Build twice and notice it is disabled
6. Remove `DisableFastUpToDateCheck` from the project
7. Build twice and notice the second log output is shorter than in step 3

When the fast up-to-date check is disabled, we clear out our snapshot and stop processing deltas.

If, during a project's lifetime, the fast up-to-date check transitions from being disabled to being enabled, then deltas observed from that point forward will be applied upon that empty snapshot, which explains the shorter output we saw in step 7 above.

We need to ensure that the first update following the transition from disabled to enabled applies the full project state, not just the delta. That will get us back into the correct state.

The current workaround is to reload the project.

If a customer is re-enables the fast up-to-date check then discovers it is not working correctly, they may disable it again.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.