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

Always Return IDotnetAcquireResult or undefined instead of sometimes #1999

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

nagilson
Copy link
Member

Per dotnet/vscode-csharp#7684 (comment)
The current findPath API can return a IDotnetAcquireResult (which is just an object with dotnetPath : string) if the existingDotnetPath is returned, but otherwise it will return a string. This is a mistake. I would like to break it as quickly as possible before it has more widespread adoption.

The class gives us more flexibility to add more information in the future besides the path string without breaking people.

I also added return type annotations to the functions so this does not happen again.

…mes a string on `findPath` API

The current findPath API can return a `IDotnetAcquireResult` (which is just an object with `dotnetPath : string`) if the existingDotnetPath is returned, but otherwise it will return a string. This is a mistake. I would like to break it as quickly as possible before it has more widespread adoption.

 The class gives us more flexibility to add more information in the future besides the path string without breaking people.

I also added return type annotations to the functions so this does not happen again.
@nagilson nagilson requested a review from a team October 23, 2024 22:01
@nagilson nagilson enabled auto-merge (squash) October 23, 2024 22:47
@nagilson nagilson merged commit a363f33 into dotnet:main Oct 23, 2024
9 checks passed
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.

2 participants