Skip to content

Fallback to jedi when using python 2.7, <=3.5 - #15734

Merged
Karthik Nadig (karthiknadig) merged 3 commits into
microsoft:mainfrom
karthiknadig:fallback-27
Mar 22, 2021
Merged

Fallback to jedi when using python 2.7, <=3.5#15734
Karthik Nadig (karthiknadig) merged 3 commits into
microsoft:mainfrom
karthiknadig:fallback-27

Conversation

@karthiknadig

@karthiknadig Karthik Nadig (karthiknadig) commented Mar 19, 2021

Copy link
Copy Markdown
Member

In this PR:

  1. Split jedi and jedi-language-server installation.
  2. Upgrade jedi-language-server to latest.
  3. Use jedi < 0.18 for 2.7 and <= 3.5.

Closes #15735
Closes #15724
Closes #15731

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor cleanup in dependencies, otherwise LGTM!

Comment thread .github/actions/build-vsix/action.yml Outdated
Comment thread gulpfile.js
Comment thread jedils_requirements.in Outdated
Comment thread pythonFiles/runJediLanguageServer.py
Comment thread src/client/activation/activationService.ts Outdated
@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #15734 (b798b28) into main (3ca66f9) will increase coverage by 0%.
The diff coverage is 16%.

@@           Coverage Diff           @@
##            main   #15734    +/-   ##
=======================================
  Coverage     64%      65%            
=======================================
  Files        557      551     -6     
  Lines      26730    26370   -360     
  Branches    3887     3806    -81     
=======================================
- Hits       17292    17257    -35     
+ Misses      8708     8382   -326     
- Partials     730      731     +1     
Impacted Files Coverage Δ
src/client/activation/activationService.ts 86% <0%> (-3%) ⬇️
...rc/client/activation/jedi/languageClientFactory.ts 46% <0%> (ø)
src/client/telemetry/index.ts 77% <ø> (ø)
src/client/telemetry/constants.ts 100% <100%> (ø)
src/client/activation/jedi.ts 19% <0%> (-2%) ⬇️
src/client/providers/jediProxy.ts 23% <0%> (ø)
src/client/common/platform/fileSystem.ts 80% <0%> (ø)
src/client/common/installer/poetryInstaller.ts 95% <0%> (ø)
...nts/discovery/locators/services/condaEnvService.ts 80% <0%> (ø)
...discovery/locators/services/condaEnvFileService.ts 85% <0%> (ø)
... and 6 more

Comment thread pythonFiles/runJediLanguageServer.py
Comment on lines +236 to +241
if (serverType === LanguageServerType.JediLSP && interpreter && interpreter.version) {
if (interpreter.version.major < 3 || (interpreter.version.major === 3 && interpreter.version.minor < 6)) {
sendTelemetryEvent(EventName.JEDI_LANGUAGE_SERVER_FALLBACK);
serverType = LanguageServerType.Jedi;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We should probably mention this in JediLSP description in package.json.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We don't have a description for the individual values in the LS field. May be we can change it (field type) to be better described. Although there still no consensus on how to provide enum descriptions in json.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I see, we can skip this for now I guess.

@karthiknadig
Karthik Nadig (karthiknadig) merged commit 3121b91 into microsoft:main Mar 22, 2021
Karthik Nadig (karthiknadig) added a commit to karthiknadig/vscode-python that referenced this pull request Mar 22, 2021
* Fallback to jedi when using 2.7

* Address comments.

* Update jedi-language-server to latest again
Karthik Nadig (karthiknadig) added a commit that referenced this pull request Mar 23, 2021
* Fallback to jedi when using 2.7

* Address comments.

* Update jedi-language-server to latest again
@karthiknadig
Karthik Nadig (karthiknadig) deleted the fallback-27 branch March 24, 2021 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip tests Updates to tests unnecessary

Projects

None yet

4 participants