Repository navigation
Specify SDK version in global.json - #2592
Conversation
|
I agree that my solution is partially wrong because it runs the same command in CI twice... That said, removing the second invocation locally removes the "fix" I tried to make. You can try this, just add an internal method with unused parameter and run lint. It should "fail" due to So I think that locally we should still run the tool twice - once to apply any automatic fixes it can, and second time to report detailed warnings for the things it couldn't fix. The CI should be fine running it once with |
|
Thanks @vitek-karas, I see what you mean. Personally I wouldn't mind having to run |
* Fix how test find the ref pack to compile test cases against (#2610) With latest VS we get a 6.0.2 runtime but only 6.0.1 ref pack. The tests so far expected to use the exact same version, but there's no hard rule that it will be the case. Change the algorithm to search for highest available major.minor.* ref pack if the matching one doesn't exist. * Specify SDK version in global.json (#2592) Co-authored-by: Vitek Karas <[email protected]> Co-authored-by: Sven Boemer <[email protected]>
Commit migrated from dotnet/linker@6e11d05
* Fix how test find the ref pack to compile test cases against (dotnet/linker#2610) With latest VS we get a 6.0.2 runtime but only 6.0.1 ref pack. The tests so far expected to use the exact same version, but there's no hard rule that it will be the case. Change the algorithm to search for highest available major.minor.* ref pack if the matching one doesn't exist. * Specify SDK version in global.json (dotnet/linker#2592) Co-authored-by: Vitek Karas <[email protected]> Co-authored-by: Sven Boemer <[email protected]> Commit migrated from dotnet/linker@f7e921c
@vitek-karas I saw some strange behavior in the lint script again in #2585. It was failing in PR but not locally. I tracked this down to the fact that our
global.jsondoesn't specify an SDK version, so it was running locally with a version ofdotnet formatfrom the 7.0 SDK I have installed.The pipeline is already passing
--verify-no-changesso I don't think we need to run it twice.I took the
allowPrereleaseandrollForwardsettings from dotnet/runtime to make it possible to build the repo locally even with a later SDK (even though it becomes possible then to run into this issue). I don't have a strong preference on it and would be fine with requiring the exact SDK if you prefer.