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

Avoid depending on the vscode module as much as possible #50

Open
Blond11516 opened this issue Oct 11, 2023 · 1 comment
Open

Avoid depending on the vscode module as much as possible #50

Blond11516 opened this issue Oct 11, 2023 · 1 comment

Comments

@Blond11516
Copy link
Collaborator

We should avoid depending on the vscode typescript module as much as possible because it's only available when the extension is run within vscode itself.

This is fine for using the extension normally, but it complicates tests a lot because we have to create manual mocks for anything we import from vscode that has a runtime component (ie not types).

The worst offender is Uri, for which there is a partial replacement through the vscode-uri package, but it's not a perfect match. Some tedious manual mocking is still required.

The ultimate goal would be to have no dependencies on vscode outside of the extension.ts entrypoint.

@Blond11516
Copy link
Collaborator Author

This should probably also extend to vscode-languageclient/node, which has some transitive dependencies on vscode

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

No branches or pull requests

1 participant