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

Switched to Microsoft.VisualStudio.Language v17.6.268 - Autocomplete compatibility fix part 1 #198

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

PiotrKarczmarz
Copy link
Collaborator

@PiotrKarczmarz PiotrKarczmarz commented Jan 17, 2025

Autocomplete compatibility fix allowing to support autocomplete starting from Visual Studio VS 17.6+
It was tested against VS versions:

  • 17.7.6
  • 17.9 Preview 2
  • 17.10.3
  • 17.12
  • 17.13.0 Preview 2.1

Internally Microsoft.VisualStudio.Language version is set to 17.0.0.0 after compilation, regardless of Microsoft.VisualStudio.Language version used as nuget package. The important part is Microsoft.VisualStudio.Threading library, which version set explicitly to match nuget Microsoft.VisualStudio.Language version.

image

Test plan

  1. Test autocomplete using your current VS version, and others if they are available.

Copy link

github-actions bot commented Jan 17, 2025

Test Results

25 tests  +25   23 ✅ +23   23m 29s ⏱️ + 23m 29s
 1 suites + 1    2 💤 + 2 
 1 files   + 1    0 ❌ ± 0 

Results for commit 6c92eaf. ± Comparison against base commit d1ed3ba.

♻️ This comment has been updated with latest results.

@PiotrKarczmarz PiotrKarczmarz changed the title Switched to Microsoft.VisualStudio.Language v17.6.268 Switched to Microsoft.VisualStudio.Language v17.6.268 - autocomplete compatibility fix part 1 Jan 17, 2025
@PiotrKarczmarz PiotrKarczmarz changed the title Switched to Microsoft.VisualStudio.Language v17.6.268 - autocomplete compatibility fix part 1 Switched to Microsoft.VisualStudio.Language v17.6.268 - Autocomplete compatibility fix part 1 Jan 17, 2025
Copy link
Contributor

@kalanchan kalanchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving to unblock

@PiotrKarczmarz PiotrKarczmarz merged commit d0f2fc0 into main Jan 20, 2025
21 checks passed
@PiotrKarczmarz PiotrKarczmarz deleted the piotr/visualstudio-language-v17-6 branch January 20, 2025 10:51
PiotrKarczmarz added a commit that referenced this pull request Jan 21, 2025
Autocomplete loads and initialize via MEF independently from the main extension. It allows to avoid extension crashes in Visual Studio versions below 17.6, which doesn't support using `Microsoft.VisualStudio.Language` library, more precisely
`Microsoft.VisualStudio.Threading` v17.6 (check #198). 

If the current VS version supports `Microsoft.VisualStudio.Language`, `Cody.VisualStudio.Completions.dll` will be silently loaded via MEF. Otherwise, `Cody.VisualStudio.Completions.dll` won't be loaded, but the main extension will be working.

In the future, if Visual Studio will introduce breaking changes to Microsoft.VisualStudio.Language API, the main extension with chat will still be working, but autocomplete will be silently turned off.

It was tested against VS versions:

17.7.6
17.9 Preview 2
17.10.3
17.12
17.13.0 Preview 2.1
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