Skip to content

Breaking vscode into modules #511

@kmalakoff

Description

@kmalakoff

It's really great to see vscode's source released!

I've been look at your implementation of git and given the extensiveness of it, I was wondering if it could be a great, general purpose git wrapper around the CLI.

I spent a little bit of time trying to see what would be involved in extracting it into an npm module compiled into JavaScript (bear in mind I've never used typescript).

I ran into quite a few challenging problems:

  1. typescript and module paths - it looks as if typescript handles modules very differently than node, brunch, webpack, ES6, etc. I've never used typescript before, but maybe they have some sort of global paths rather than relative paths or perhaps this was a choice by the vscode team? Ideally, all of the git implementation would be self-referencing using relative paths and depend on the smallest number of shared modules as needed using absolute paths to the node_modules folders / modules.

  2. cross-dependencies into the vs directory - it looks like vscode was written in a semi-monolithic, but nicely grouped way rather than as many smaller modules. Ideally, there would be a separation between client, common, and node logic around smaller aspects rather than through the big platform and workbench buckets to reduce cross-dependencies and to promote reuse. When I'm trying to only compile an entry point through common/git/git.ts, it seems to be pulling in vs/base/browser/keyboardEvent.ts but I cannot figure out where the dependency is from (I'm new to typescript so not sure how to do dependency tracing).

These two aspects of code structure makes it difficult to separate the git functionality from all of the application logic so I'm putting aside this idea for now; however....I was wondering if there any plans to break up vscode into smaller, reusable modules using npm like Atom did?

Obviously, it is still early days for open sourcing vscode and I'm sure there are a lot of other things on your roadmap, but this would be a great longer-term goal!

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions