Filter Targlet Repository Contents [message #1837313] |
Wed, 27 January 2021 11:27  |
Felix Dorner Messages: 392 Registered: December 2015 |
Senior Member |
|
|
Is it possible to add an oomph targlet repository and have oomph only see a specific set of features in the repository, and ignore everything else? For example, if I have an existing targlet repo pointing to
http://download.eclipse.org/releases/2019-06 which adds antlr 4.3.0 to my target platform.
I now need something from eclipse orbit, say org.apache.pdfbox, so I add the orbit repo to my targlet repo list:
https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/
Now that orbit repo also has antlr 4.7.2 and - if I understand correctly - when the oomph/p2 resolver runs it finds that newer antlr version in orbit and the old 4.3.0 gets replaced by 4.7.2. What If I don't want that?
The obvious choice is to add an upper bound to the antlr dependency, but a) I might not be in control of that (because the antlr dependency comes from an upstream project I have no control over), and b) I can really see that it's much easier to say: I want the antlr from the eclipse release repo, and I don't care about which version it is, as long as it's from that repo.
I guess I'm still confused about the differences between .target files and targlets:
In my mind, a .target file looks like:
repo1
- plugin1
- plugin2
repo2
- plugin3
- plugin4
And then, even if repo2 has a higher version of plugin1, PDE will pull it in from repo1.
Whereas with targlets, it looks like this:
Targlet1
-repo1
plugin1
plugin2
Targlet2
-repo2
plugin3
plugin4
If I understand it right, oomph just uses the whole list of targlet repos and tries to get plugin1,2,3,4 from any repo in the list of the repos in the list, taking the highest version of each, unless an upper bound is specified.
So I lose the ability to selectively pick a repo from which any plugin has to come from, right?
|
|
|
Re: Filter Targlet Repository Contents [message #1837317 is a reply to message #1837313] |
Wed, 27 January 2021 12:33   |
Ed Merks Messages: 32822 Registered: July 2009 |
Senior Member |
|
|
I'm not sure if you've look at this:
https://wiki.eclipse.org/Oomph_Targlets
One of the primary and most powerful aspects of targlets is that you can specify requirements that are ranges. With a target file, you can specify an exact version of no version, which effectively picks the highest version.
I wouldn't characterize things the way you did at all. It does not matter where something comes from. All that matters is which things you want resolve. You can specify exactly which version you want, or a range of version that are allowed, depending on how strictly you want to limit the choice or how flexible you want the resolution to be. And in the end, the requirements of the sum total of all the things in your workspace and the all other things in the TP that are resolved are also super important. If those "upstream bundles" are all happy with a broad range of antlr versions, then why are you being so fussy, and if you want to be so fussy, why not specify exactly, or somewhat more precisely, which version you want, rather than try to control the whole deal via the available choices? I just don't see the great virtue in that approach....
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|
|
Re: Filter Targlet Repository Contents [message #1837367 is a reply to message #1837361] |
Thu, 28 January 2021 15:07  |
Ed Merks Messages: 32822 Registered: July 2009 |
Senior Member |
|
|
The * thing is of course very useful to say you require everything in the source locator. After all, you'll want your TP to include everything needed by your workspace's plugins and features so that they actually can compile and can actually launch successfully. PDE offers nothing like this. Then you only need a few high level features that would otherwise not be included fully. In the end, you can restrict a few things if you really want specific versions of specific things for some particular reason, but you should keep in mind that, when the user installs things, anything that could validly resolve in the target platform via some arbitrary set of p2 repos, without your additional restrictions to force specific versions, could very well be exactly what some user ends up with, so it ought to work too...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02082 seconds