Skip to content

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

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

jasonmalinowski merged 1 commit into
dotnet:mainfrom
jasonmalinowski:fix-endless-rebuilding-of-semanticsearch-binaries

Conversation

@jasonmalinowski

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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