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

Idempotent change won't mark dependency unresolved #7990

Merged

Conversation

drewnoakes
Copy link
Member

@drewnoakes drewnoakes commented Mar 21, 2022

Fixes #2510
Fixes #5356

Previously, any evaluation of the project that changed a dependency would mark it as unresolved until the build data arrives.

Some kinds of changes trigger a change in evaluation that is not accompanied by a corresponding change in build data. The evaluation update would set the dependency to unresolved, expecting the build to resolve it. Yet the build delta would exist and so the dependency would be left unresolved.

The changes in this PR cause the tree to remember the set of resolved references. When an evaluation occurs, we do not mark a known-resolved dependency as unresolved. If the build does not trigger a change, then the dependency remains in the correct state.

There are some cleanups in separate commits. The main change is in 9859b6f.

Before

fix-2510-before gif

After

fix-2510-after gif

Microsoft Reviewers: Open in CodeFlow

Implementations of these methods are identical.
Previously, any evaluation of the project that changed a dependency would mark it as unresolved until the build data arrives.

Some kinds of changes trigger a change in evaluation that is not accompanied by a corresponding change in build data. The evaluation update would set the dependency to unresolved, expecting the build to resolve it. Yet the build delta would exist and so the dependency would be left unresolved.

The change in this commit remembers the set of resolved references. When an evaluation occurs, we do not mark a known-resolved dependency as unresolved. If the build does not trigger a change, then the dependency remains in the correct state.
@drewnoakes drewnoakes added the Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references label Mar 21, 2022
@drewnoakes drewnoakes requested a review from a team as a code owner March 21, 2022 03:27
@ghost ghost added the Tenet-User Friendly This issue affects the "User Friendly" tenet; UI usability, accessibility or high-DPI related. label Mar 21, 2022
@drewnoakes
Copy link
Member Author

This also fixes #5356, where renaming the project would force dependencies to become unresolved.

@drewnoakes drewnoakes merged commit b32d439 into dotnet:main Mar 23, 2022
@drewnoakes drewnoakes deleted the fix-2510-idempotent-dependency-changes branch March 23, 2022 02:09
@ghost ghost added this to the 17.2 milestone Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Tenet-User Friendly This issue affects the "User Friendly" tenet; UI usability, accessibility or high-DPI related.
Projects
None yet
2 participants