Skip to content

vsce: create vscode package, establish architecture

Administrator requested to merge tjk/vsce-v1 into main

Created by: tjkandala

In this PR I establish the core of the new Sourcegraph VS Code extension. That includes stuff like bundling, state management, settings management, and an RPC layer. No UI work yet; that will come in future PRs, mostly involving translating features from our prototype to work with the new architecture. I believe that this new architecture will eliminate a class of state-related bugs from the prototype.

I'm experimenting with writing documentation in code as opposed to in a separate docsite. I believe developers (projecting from personal experience 😊) are more likely to read comments than look for docs before contributing. I also think this VS Code extension, much like our browser extension, is kind of weird, and that makes it harder to understand at face value/by just reading code.

On that note, the rest of my PR description will just be a few code snippets:

https://github.com/sourcegraph/sourcegraph/blob/7ae2a4751d161d712b0ede658b79a6a6d90d6a56/client/vscode/src/extension.ts#L14-L42

https://github.com/sourcegraph/sourcegraph/blob/7ae2a4751d161d712b0ede658b79a6a6d90d6a56/client/vscode/src/state.ts#L6-L40

https://github.com/sourcegraph/sourcegraph/blob/7ae2a4751d161d712b0ede658b79a6a6d90d6a56/client/vscode/src/webview/comlink/index.ts#L6-L28

Co-authored-by: Beatrix [email protected]. Big shoutout to Beatrix for getting the prototype extension to work on both desktop and web, I used a lot of her work here, and will do so in following PRs as well 🎊.

Reviewer note: I don't need a thorough review at the moment, just a soundness check and a stamp if it all checks out! If you have the time though, I would appreciate any feedback now that it's merged

Merge request reports

Loading