Skip to content

Add languageServer setting allowing None - #9182

Merged
Mikhail Arkhipov (MikhailArkhipov) merged 8 commits into
microsoft:masterfrom
MikhailArkhipov:lsswitch
Dec 18, 2019
Merged

Mikhail Arkhipov (MikhailArkhipov) merged 8 commits into
microsoft:masterfrom
MikhailArkhipov:lsswitch

Conversation

@MikhailArkhipov

@MikhailArkhipov Mikhail Arkhipov (MikhailArkhipov) commented Dec 18, 2019 •

Copy link
Copy Markdown

For #7010

jediEnabled is retained for compatibility with existing settings users have and IntelliCode. IC will be updated to use languageServer instead so jediEnabled can be retired some time in the future.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Appropriate comments and documentation strings in the code
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated

- [ ] Test plan is updated as appropriate
- [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed)
- [ ] The wiki is updated with any design decisions/details.

@codecov-io

Codecov (codecov-io) commented Dec 18, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #9182 into master will increase coverage by 0.65%.
The diff coverage is 65.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9182      +/-   ##
==========================================
+ Coverage    56.8%   57.45%   +0.65%     
==========================================
  Files         550      551       +1     
  Lines       28938    29366     +428     
  Branches     4441     4445       +4     
==========================================
+ Hits        16438    16873     +435     
+ Misses      11560    11550      -10     
- Partials      940      943       +3
Impacted Files Coverage Δ
src/client/common/types.ts 100% <ø> (ø) ⬆️
src/client/telemetry/index.ts 86.48% <ø> (ø) ⬆️
src/client/common/configSettings.ts 58.82% <100%> (+1.06%) ⬆️
src/client/activation/serviceRegistry.ts 100% <100%> (ø) ⬆️
src/client/activation/refCountedLanguageServer.ts 40% <100%> (ø) ⬆️
src/client/activation/types.ts 100% <100%> (ø) ⬆️
src/client/telemetry/constants.ts 100% <100%> (ø) ⬆️
src/client/activation/activationService.ts 89.63% <81.25%> (-3.85%) ⬇️
src/client/activation/none/activator.ts 9.09% <9.09%> (ø)
...lient/datascience/jupyter/jupyterSelfCertsError.ts 100% <0%> (ø) ⬆️
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbddaf9...88533ba. Read the comment docs.

* @implements {ILanguageServerActivator}
*/
@injectable()
export class NoLanguageServerExtensionActivator implements ILanguageServerActivator {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Rich Chiodo (@rchiodo) if users opt not to use a LS, then notebook will not get any intellisense. We might want to throw a message to the user in such cases and do something about it. To me the easiest is ask the user to switch to Jedi or Msft.

*/
@injectable()
export class NoLanguageServerExtensionActivator implements ILanguageServerActivator {
// tslint:disable-next-line: no-empty

@DonJayamanne Don Jayamanne (DonJayamanne) Dec 18, 2019 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mikhail Arkhipov (@MikhailArkhipov) If user choses none, then users will not see any codelenses for tests.
Today we use the LSP to determine the position of the test methods when defining the locations for code lenses.
Luciana Abud (@luabud) Karthik Nadig (@karthiknadig) Brett Cannon (@brettcannon) /cc

I.e. if user uses none, then some other parts of the extension are broken.
We need to either:

  • Notify the user about this
  • Or start & use jedi for just these features (just as we would if we require intelliense in notebooks).

I prefer option 1.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Output window gets Editor support is inactive since language server is set to None. but I guess we could pop up something more prominent with Don't show it again.

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.

It's a question for Luciana Abud (@luabud) on how best to communicate this, but I also expect only advanced users to be switching this off so hopefully they're sophisticated enough to comprehend there are ramifications.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Concerns about

  • Code lenses for tests not working
  • Notebooks not having functioning intelliense

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:shipit:

@MikhailArkhipov
Mikhail Arkhipov (MikhailArkhipov) merged commit d5f745d into microsoft:master Dec 18, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Dec 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

5 participants