Make it easier to maintain and consume Theia extensions #10791
Replies: 5 comments 4 replies
-
This is a big issue when using resolutions and currently you must rebuild every extension you develop when a new version of Theia arrives to circumvent any possibility of API breakage. This overhead makes it hard to reuse and integrate Theia Extensions as npm packages, also as only one version of Theia Extensions is allowed, you fall back to resolutions as the only option if you publish extensions with the described pitfall. So even with a proper API management more is needed to make the consumers solution improved and easier. |
Beta Was this translation helpful? Give feedback.
-
From the perspective of an extension provider I think one huge improvement would be if Theia would properly support declaring extension dependencies as
Extension providers could declare their dependencies to other theia extensions as Currently this is not well supported because the |
Beta Was this translation helpful? Give feedback.
-
Thanks for bringing up this important topic! Theia is awesome, provides tremendous flexibility and evolves fast! However, exactly for the reasons you mention, pain points arise if you want to share Theia extensions across teams and products, which may hamper the growth of the Theia extension ecosystem. There are a few aspects involved that interrelate or contribute to the friction you mention:
This essentially leads to the common approach of using The consequence is that consumers need to manually find a Theia version that works with the set of extensions they pull in. Of course, there might be combinations of Theia extensions where you won't find a common Theia version that works with all of them. There is nothing wrong with that per se (it can happen, that's life :-)), but the issue is that the only way to find out is manual trial and error. I think it would be great, if we could come up with a mix of tools, processes, and best practices to avoid or mitigate the issues above and help organizations and products to establish a more structured approach. Some ideas that we could put up for discussions are
What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hi Philip,
I haven't looked into the implications of changing the dependencies of core extensions to |
Beta Was this translation helpful? Give feedback.
-
Hi folks, a couple of thoughts from my side: I think there is a technical side to this discussion (duplicate modules bad!) that can be solved with technical means and I'm all for it. However, there are more fundamental questions to be answered here, as well. It might come as a surprise to some that we do have an API management policy (https://github.com/eclipse-theia/theia/blob/master/doc/api-management.md#stable) and even more surprisingly, we're following it to the letter. That is trivially true, because we have no stable API whatsoever. None, zero, zilch! The first thing we would have to do in order to give the semantic versions any meaning would be to define a reasonable subset of our code as API. Interestingly, we're already doing this when deciding what to put in the "breaking changes" document. We're not putting every change to a public class in there, AFAIK. I can see two ways to go about defining API: push and pull. In "push", we would open an epic to go over parts of our code and identify the parts we (as the framework writers) feel clients should interact with (by extending, overriding, etc.). The "pull" approach would be for adopters to request something they rely on to be stable API. I kind of like the pull approach, because it would allow us to learn what is actually treated as API by clients. One thing to be aware of is that the API will always be smaller than some adopters would like: the framework creators might not want to promise stability in certain areas, even if clients use them. Once we're accepting that we have stable API, I think semantic versioning is a good way to label releases. With our API stability rules as they are, we might just end up with "funny" release sequences: "14.0.0, 15.0.0, 15.1.0, 16.0.0", so not many point releases. The second topic to be considered is API stability over time. We're not breaking API just because it's fun. API breakages are caused by improvements to the code (functional or quality), and if there is a non-breaking way to do the same, we will embrace it. So by keeping API stable for longer, we're postponing positive changes to the code base. I'm not in favor or that. What API stability brings you is that you can update to a newer version without needing to update your own code. The alternative is to depend on an older version. That is sometimes undesirable because you might want fixes and features from later versions. However, unless we commit to some kind of LTS releases (including doing fixes for older versions), you'll have to catch up to the API changes eventually (and do more changes). What I could envision is that we declare every nth release a "stable" release in that we invest more in testing and focus on fixing bugs before the "stable" release. Large scary changes would not go into that release. That would make it a good base for updating to. With the resources available to the project, I can't see us maintaining LTS releases right now. Maybe that is something that adopter companies could pay for? The Theia project would declare a release "LTS" so when people contribute fixes for an old release, they all contribute to the same branch. One thing we're missing right now is a succinct documentation of stable API. Some kind of just my 2 kopiyky. |
Beta Was this translation helpful? Give feedback.
-
Creating and consuming Theia extensions involves quite a bit of friction at the moment.
resolutions
to ensure that only one set of@theia
dependencies is present in the application, and has to hope that no API used by the extension have been broken since the last release. From the perspective of the extension author, you have to keep synched with the Theia release cycle to ensure that your consumers don't end up unable to use your extension.Some of this ties in with API management: we don't have any concept of more and less stable API for extenders to rely on, so there's a chance of breakage at any uplift, and consuming extensions on different releases cycles from Theia core is a potentially risky business.
Some additional details:
#9153
Beta Was this translation helpful? Give feedback.
All reactions