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

Always write the Api output files, even if they don't change #77097

Conversation

jasonmalinowski
Copy link
Member

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

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
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 7, 2025
@jasonmalinowski jasonmalinowski requested a review from tmat February 7, 2025 01:03
try
{
currentContent = File.ReadAllText(outputFilePath, Encoding.UTF8);
File.WriteAllText(outputFilePath, newContent);
Log.LogMessage($"Baseline updated: '{outputFilePath}'");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: might be useful to output different message when the content differs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will leave as is unless we need that.

@jasonmalinowski jasonmalinowski merged commit 3a9318e into dotnet:main Feb 7, 2025
25 checks passed
@jasonmalinowski jasonmalinowski deleted the fix-endless-rebuilding-of-semanticsearch-binaries branch February 7, 2025 16:35
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Feb 7, 2025
@akhera99 akhera99 modified the milestones: Next, 17.14 P2 Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SemanticSearch.ReferenceAssemblies is rebuilding the references every time, even if not needed
5 participants