-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Mix the source generator version info into the dependent checksum we get for projects #77273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signing off. General curiosity questions don't need to be answered prior to merge.
var transitiveDependencies = solution.GetProjectDependencyGraph().GetProjectsThatThisProjectTransitivelyDependsOn(this.ProjectState.Id); | ||
// Calculate a checksum this project and for each dependent project that could affect semantics for this | ||
// project. We order the projects so that we are resilient to the underlying in-memory graph structure | ||
// changing this arbitrarily. We do not want that to cause us to change our semantic version.. Note: we |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// changing this arbitrarily. We do not want that to cause us to change our semantic version.. Note: we | |
// changing this arbitrarily. We do not want that to cause us to change our semantic version. Note: we |
// changing this arbitrarily. We do not want that to cause us to change our semantic version.. Note: we | ||
// use the project filepath+name as a unique way to reference a project. This matches the logic in our | ||
// persistence-service implementation as to how information is associated with a project. | ||
var transitiveDependencies = solution.SolutionState.GetProjectDependencyGraph().GetProjectsThatThisProjectTransitivelyDependsOn(this.ProjectState.Id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking a general question which doesn't need to impact this PR:
Is there a reason this gets the full transitive list versus just asking the immediate project references and mixing in their checksums, which would themselves depend on their immediate project references...etc? Are we going to be generating extra dependency graph entries here even though we don't need to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have a followup pr that does that :)
// changing this arbitrarily. We do not want that to cause us to change our semantic version.. Note: we | ||
// use the project filepath+name as a unique way to reference a project. This matches the logic in our | ||
// persistence-service implementation as to how information is associated with a project. | ||
var transitiveDependencies = solution.SolutionState.GetProjectDependencyGraph().GetProjectsThatThisProjectTransitivelyDependsOn(this.ProjectState.Id); | ||
var orderedProjectIds = transitiveDependencies.OrderBy(id => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking a general question which doesn't need to impact this PR:
Why do we sort this way versus just sorting by GUID or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would work as well!
For @dibarbet
David, consider taking this approach and mixing into your current PR around diagnostics + SG.