Skip to content

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

Merged
jasonmalinowski merged 1 commit intodotnet:mainfrom
jasonmalinowski:fix-endless-rebuilding-of-semanticsearch-binaries
Feb 7, 2025
Merged

Always write the Api output files, even if they don't change#77097
jasonmalinowski merged 1 commit intodotnet:mainfrom
jasonmalinowski:fix-endless-rebuilding-of-semanticsearch-binaries

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
@ghost ghost 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
{
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