Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

Refactor pylance reusable pieces to only depend upon protocol types #30

Merged
merged 9 commits into from
Dec 7, 2021

Conversation

rchiodo
Copy link
Contributor

@rchiodo rchiodo commented Dec 7, 2021

@rchiodo rchiodo requested a review from a team as a code owner December 7, 2021 23:00
@rchiodo
Copy link
Contributor Author

rchiodo commented Dec 7, 2021

/cc @heejaechang @bschnurr

@@ -2,8 +2,8 @@
// Licensed under the MIT License.

'use strict';
import * as vscode from 'vscode';
import * as protocol from 'vscode-languageclient/node';
import * as vscodeUri from 'vscode-uri';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@heejaechang @bschnurr this file should now be not using any of the vscode types.

@@ -0,0 +1,952 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as os from 'os';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same with this file. Should be vscode free.

import * as vscode from 'vscode';
import * as protocol from 'vscode-languageclient/node';
import * as vscodeUri from 'vscode-uri';
import * as protocol from 'vscode-languageclient';
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it helps but we get all the types for TextDocument, Range, Position from vscode-languageserver-types lib

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh thanks. I'll try that and see what happens. Should be the same I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't work, but 'vscode-languageserver-protocol' seems to work. I'll switch to that one.

@rchiodo rchiodo merged commit 82a49eb into main Dec 7, 2021
@rchiodo rchiodo deleted the rchiodo/middleware_refactor branch December 7, 2021 23:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants