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

Validate dotnet process exit code when discovering .NET SDK / runtime info #106

Merged
merged 7 commits into from
Aug 13, 2024

Conversation

tintoy
Copy link
Owner

@tintoy tintoy commented Jul 28, 2024

Improve behaviour of .NET version detection when the .NET host cannot resolve a matching runtime or SDK for global.json.

The dotnet host has many known exit codes, but currently only a couple are currently of interest to us. I have nevertheless included all known exit codes in an enum since the exit-code names (rather than just hex numbers) are quite likely to aid future troubleshooting efforts.,

This PR only partially addresses tintoy/msbuild-project-tools-vscode#156 (the language server side), although, since VSCode's language client doesn't provide access to the process exit code, it's challenging (for the extension side) to reliably return user-facing error messages from the language server (in scenarios like this that occur before the LSP connection has been established).

We might want to consider changing our STDERR output, at some point, be JSON format so the extension has a better chance of interpreting it.

@tintoy tintoy requested a review from DoctorKrolic July 28, 2024 03:25
@tintoy tintoy self-assigned this Jul 28, 2024
tintoy added 3 commits July 31, 2024 20:56
- Rename TaskScannerTests.RuntimeInfo to TaskScannerTests.CurrentDotnetInfo
@tintoy
Copy link
Owner Author

tintoy commented Aug 12, 2024

Haven’t forgotten about this, BTW - work is just a little hectic at the moment. Should have it done in a day or 2!

- Don't use hex notation for dotnet host exit codes
- Use <inheritdoc />  for exception constructors
@tintoy tintoy merged commit 44d0d2d into master Aug 13, 2024
1 check was pending
@tintoy tintoy deleted the feature/improve-dotnet-version-detection branch August 13, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants