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

Get full parsable version part in .NET SDK Validator #2646

Merged

Conversation

caaavik-msft
Copy link
Contributor

Unfortunately there was a bug introduced in #2645 that I missed which this PR will fix. Essentially if you use --runtimes monoaotllvm or --runtimes wasm, it would actually return new Version(9, 0, 0) because it defers to CoreRuntime.TryGetVersion() to get the version. The code that parsed the output of dotnet --list-sdks was only looking at the major and minor versions, and so the comparison of new Version(9, 0, 0) <= new Version(9, 0) was returning false. With this change we will read the full version string including the feature band/patch version.

In the dotnet/runtime performance tests we don't use --runtimes wasm but we do use --runtimes monoaotllvm to run the Mono AOT benchmarks, so this will fix that one. I'm doing some more testing locally but wanted to get the PR out now so it can get some reviews and get it merged quickly.

@caaavik-msft caaavik-msft changed the title Get full parsable version part Get full parsable version part in .NET SDK Validator Sep 24, 2024
@caaavik-msft
Copy link
Contributor Author

@timcassell @am11 @lewing

@timcassell
Copy link
Collaborator

Out of curiosity, how did you run into the situation of (9, 0, 0) vs (9, 0)? From the code in the previous PR, it looks like you were only parsing and comparing major and minor.

@caaavik-msft
Copy link
Contributor Author

Out of curiosity, how did you run into the situation of (9, 0, 0) vs (9, 0)? From the code in the previous PR, it looks like you were only parsing and comparing major and minor.

This line was returning (9, 0, 0) and the GetInstalledDotNetSdks was returning (9, 0).

@caaavik-msft
Copy link
Contributor Author

Was able to reproduce the version error on my local machine and confirmed that this PR makes it all work correctly. Also just confirmed that --wasmnet90 still works with .NET 10 SDK installed and that is still working. So we should be all good to merge if it looks good.

@lewing
Copy link
Member

lewing commented Sep 24, 2024

merge away :)

@timcassell timcassell merged commit 52485ec into dotnet:master Sep 24, 2024
8 checks passed
@timcassell timcassell added this to the v0.14.1 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants