dotnet / dotnet/orleans

Orleans_DesignTimeBuild CompilerVisibleProperty breaks fast up-to-date check

Open
#9,664 5 comments 0 reactions 1 assignee Claimed by @ReubenBond View on GitHub
Dominant language
C#
Stars
10.9k
Forks
2.1k
Avg merge
14h 42m
Merged PRs (30d)
354

Description

The Orleans_DesignTimeBuild property is getting generated into the GeneratedMSBuildEditorConfig.editorconfig file using this item:

https://github.com/dotnet/orleans/blob/1aef90b6f337f955fd67b72fb585474cc7e239cc/src/Orleans.CodeGenerator/build/Microsoft.Orleans.CodeGenerator.props#L4

If the project was first built from command line, the property is not set. If it's subsequently open in the IDE and a design-time build runs for the project, the file is overwritten with the true value:

Image

After that if a build command is issued, the IDE will decide to rebuild the project even if nothing has really changed, since the generated MSBuild editorconfig is considered an input for the fast up-to-date check. That build will overwrite the file again, removing DesignTimeBuild = true.

This will keep flip-flopping.

With modern source generators supporting Balanced execution mode (only run on Save and Build in the IDE), perhaps the custom logic to check for design-time build given an MSBuild property passed to the compiler is no longer required?

@ReubenBond

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.