Skip to content

Exploration: SCM providers #15246

Closed
Closed
@joaomoreno

Description

@joaomoreno

The Inner Loop

Code has successfully survived so far using git as the sole source control solution. This is obviously a narrow worldview since there are many other popular SCMs which lack of support could be limiting our user base. A few of the popular alternatives are TFS, SVN, Mercurial and Perforce.

We still consider Code to be a pretty decent tool which tackles the tight inner loop of development with git as an SCM. This inner loop focus allows us to justify having a simple UI, which lets you do 80% of the tasks within Code, while suggesting to use the CLI or another GUI application for the rest of the tasks. Think about visualising history and managing stashes, as examples. Note that these are still fair feature requests, which are properly tracked, but the argument here is that Code is still a successful tool while catering for the inner loop.

While making sense for SCMs like SVN and Mercurial, this argument might not translate easily to other, such as TFS, in which suggesting the CLI is not practical (users simply don't know how to) and suggesting another tool, which in this case happens to be Visual Studio itself, defeats the whole purpose.

This creates our first question: does the current philosophy of Code as a lightweight editor with some SCM features fit other SCM providers? Will it be enough?


The Least Common Denominator

The ultimate problem with supporting multiple SCM systems is to discover and specify the least common denominator between the different systems, in terms of functionality, UI and API. There is an obvious analogy to the Debugger world, with its debug adapters.

This can go from taking a large API area by sharing common widgets, such as buttons, input boxes, the tree, all the way to narrowing down the commonality and invent a common SCM model. Both solutions have advantages and disadvantages. They also have very different implementation time horizons.


The Interface

One other issue that came up in discussions concerns the interface between the SCM systems and Code itself.

If the least common denominator problem is solved by sharing platform UI pieces, this can be addressed the same way custom trees were in #14048. The extension API would be augmented and used for this purpose.

If, on the other hand, we decide to go down the road of supporting a common SCM model there are two alternatives. The obvious one would be to add API to our extension API, making SCM contributions simple extensions which are in charge of either spawning processes or binding to libraries in JavaScript. The other one would be to create a new protocol, on top of JSON-RPC, similarly to how it's done in the Debug world. This would enable SCM providers to be implemented in any language of choice, the obvious candidate being TFS implementation, which is already implemented as a Java library in the TEE project.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions