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

GenerateMSBuildEditorConfig task breaks incremental build on Windows when using different casing paths #10968

Open
vaboca opened this issue Nov 8, 2024 · 2 comments
Assignees

Comments

@vaboca
Copy link

vaboca commented Nov 8, 2024

Version Used: 17.10.4+10fbfbf2e

Steps to Reproduce:

  1. Have a dummy under X\x.csproj (sdk)
  2. Build from some y\dirs.proj with ProjectReference="..\X\x.csproj" -> full build
  3. Build from another z\dirs.proj with ProjectReference=..\x\x.csproj" -> will trigger full build because path is invoked with lower case "x"

Diagnostic Id:
Using "GenerateMSBuildEditorConfig" task from assembly "Current\bin\Roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll"

Input file "x\obj\amd64\LegacyUri.UnitTests.Core.GeneratedMSBuildEditorConfig.editorconfig" is newer than output file

Expected Behavior:
No recompilton CoreCompile should happen on Windows because the paths are identical, just casing is different.

@vaboca
Copy link
Author

vaboca commented Nov 8, 2024

Tagging @rainersigwald

@jaredpar
Copy link
Member

No recompilton CoreCompile should happen on Windows because the paths are identical, just casing is different.

Path case sensitivity is not strictly tied to operating systems. It is possible to have case sensitive paths on Windows. It is also possible to have paths where parts are case sensitive, and parts are case insensitive on Linux. At a tooling level we have to assume the worst case which is paths are case sensitive and act accordingly. This can lead to situations where we overbuild but won't lead to incorrect builds.

For this particular case I believe we should consider a build check flag in MSBuild. Essentially a check that fires when a path in Include for a value in ItemGroup differs from the normalized path on disk. That should alert the developer to correct this mistake.

@jaredpar jaredpar transferred this issue from dotnet/roslyn Nov 11, 2024
@maridematte maridematte self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants