Changes to Versions.props are always meaningful#5228
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where changes to Versions.props files in VMR (Virtual Mono Repo) repositories were being incorrectly filtered out as non-meaningful changes in the codeflow analysis. The fix ensures that all changes to Versions.props are treated as meaningful since VMR repos don't use automated dependency version management in these files.
Key Changes:
- Modified the forward flow change analysis logic to exclude Versions.props from the list of dependency files that are filtered out
- Added explanatory comment about VMR-specific behavior for Versions.props files
| }.ToImmutableHashSet(); | ||
|
|
||
| // In VMR repos, Versions.props doesn't contain any dependency versions maintained by automation, so every change is meaningful | ||
| public static ImmutableHashSet<string> CodeflowDependencyFiles { get; } = DependencyFiles.Except([VersionFiles.VersionsProps]).ToImmutableHashSet(); |
There was a problem hiding this comment.
nit: it might not make a difference, but i would err on the side of explicitly defining the files in CodeflowDpenendencyFiles rather than letting it depend on DependencyFiles
There was a problem hiding this comment.
What do you think about renaming DependencyFiles to something that shows it's strictly for non-codeflow subscriptions? Like NonCodeflowDependencyFiles?
There was a problem hiding this comment.
nit: it might not make a difference, but i would err on the side of explicitly defining the files in
CodeflowDpenendencyFilesrather than letting it depend onDependencyFiles
I kind of like the fact that it's easy to see what the difference is. Also if we ever add a new dependency file for whatever reason, I think it'd likely go to both places, this was kind of a special case with us splitting a file, and forcing codeflow repos to move away from Versions.props being considered a dependency file
I'm fine with the renaming tho
| }.ToImmutableHashSet(); | ||
|
|
||
| // In VMR repos, Versions.props doesn't contain any dependency versions maintained by automation, so every change is meaningful | ||
| public static ImmutableHashSet<string> CodeflowDependencyFiles { get; } = NonCodeflowDependencyFiles.Except([VersionFiles.VersionsProps]).ToImmutableHashSet(); |
There was a problem hiding this comment.
nit: could also be this:
| public static ImmutableHashSet<string> CodeflowDependencyFiles { get; } = NonCodeflowDependencyFiles.Except([VersionFiles.VersionsProps]).ToImmutableHashSet(); | |
| public static ImmutableHashSet<string> CodeflowDependencyFiles { get; } = [..NonCodeflowDependencyFiles.Except([VersionFiles.VersionsProps])]; |
#5108