Open colin-grant-work opened 3 years ago
@paul-marechal, this is the write up of an idea that we talked about the other day. Not sure it's clearly expressed, but I want to flag the issue of difficulties developing and consuming standalone extensions for consideration - exactly where we end up is pretty open.
Something like git's sparse checkout functionality could help with forking standalones, but doesn't encourage uniformity across extensions.
@colin-grant-work in my experience, relying on symlinked sources is not reliable: the problem is this: tools some tools manipulate paths as paths and others as strings: what I mean is this: when you have a path into a symlinked directory /bar/zoz (with zoz being symlinked from /foo/zoz), some tools will treat /bar/zoz/../bla as /bar/bla while others will us /foo/bla. Tool writers don't seem to expect sources to be symlinked 🤷
At the moment, the process of developing and consuming Theia packages from outside this repository is not very smooth. Two that I regularly work with, the Theia Trace Extension and Theia CPP Extensions both come wrapped in their own example applications. That can allow for some customization, but comes with the overhead of ensuring that the wrapper is up to date with Theia as well as the risk of getting far enough away from Theia that the developer experience working on the extension is quite different from working on a package inside Theia - making for a steeper learning curve and unnecessary friction.
One solution would be a Theia extension script that could scaffold a full Theia application around an extension for demos / testing and then unwrap the extension again.
Feature Description:
Something like this:
yarn wrap = 'theia-ext-scripts wrap'
Where the
wrapper
is.gitignore
d, and everything necessary for the package to operate in the example applications is copied - or, better, symlinked - from its location in the upper folder.This would have a number of benefits:
packages
folder and set about working as normal. At the moment, the fork has to live somewhere outside the repo and be linked in with some work in the tsconfig.ext-script
functionality, but it could be carried further.