Always write the Api output files, even if they don't change#77097
Merged
jasonmalinowski merged 1 commit intodotnet:mainfrom Feb 7, 2025
Merged
Conversation
The calling MSBuild targets already specify inputs and outputs; skipping writing the output files if they're not changed prevents the output timestamp from being updated, so the builds always run (and then force a rebuild of our setup projects). Fixes dotnet#77039
CyrusNajmabadi
approved these changes
Feb 7, 2025
JoeRobich
approved these changes
Feb 7, 2025
tmat
reviewed
Feb 7, 2025
| { | ||
| currentContent = File.ReadAllText(outputFilePath, Encoding.UTF8); | ||
| File.WriteAllText(outputFilePath, newContent); | ||
| Log.LogMessage($"Baseline updated: '{outputFilePath}'"); |
Member
There was a problem hiding this comment.
Nit: might be useful to output different message when the content differs.
Member
Author
There was a problem hiding this comment.
Will leave as is unless we need that.
tmat
approved these changes
Feb 7, 2025
This was referenced Feb 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The calling MSBuild targets already specify inputs and outputs; skipping writing the output files if they're not changed prevents the output timestamp from being updated, so the builds always run (and then force a rebuild of our setup projects).
Fixes #77039