dotnet / dotnet/sdk

`_GenerateCompileDependencyCache` should include EditorConfigFiles

Open
#46,133 0 comments 0 reactions 1 assignee Claimed by @baronfel View on GitHub
Area-NetSDK untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug

`_GenerateCompileDependencyCache` doesn't currently include `EditorConfigFiles`. That means, if you build with a property that only affects which `EditorConfigFiles` are passed to `Csc`, then the same hash is produced and CoreCompile will be incorrectly considered as up-to-date.

Note that `EditorConfigFiles` is included as an input to `CoreCompile`, but that's irrelevant. The output of CoreCompile is still newer than elements in `EditorConfigFiles`. It's just that the actual elements passed as `EditorConfigFiles` have changed.

### To Reproduce

Not having a minimal repro setup for now (original repro is https://github.com/microsoft/testfx/pull/4712, see test that has comment linking to this issue). But basically if you add `C:\globalconfig1.globalconfig` and `C:\globalconfig2.globalconfig` in your machine, and have one setup such that it produces a warning while the other doesn't. Then build with `dotnet build -p:CauseWarningToHappen=false` followed by `dotnet build -p:CauseWarningToHappen=true`, the issue should reproduce. (`CauseWarningToHappen` property will control which globalconfig is included in `EditorConfigFiles`).

For now, the second build only works correctly with `--no-incremental`.

### Exceptions (if any)

### Further technical details
- Include the output of `dotnet --info`
- The IDE (VS / VS Code/ VS4Mac) you're running on, and its version

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.