Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Filter Targlet Repository Contents
Filter Targlet Repository Contents [message #1837313] Wed, 27 January 2021 11:27 Go to next message
Felix Dorner is currently offline Felix DornerFriend
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 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
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 #1837320 is a reply to message #1837317] Wed, 27 January 2021 13:36 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
I have no objections to your view. As for now, I will just try and see what happens, but my guess is that something in the upstream code will break because folks should have been more fussy but weren't. And at that point I'd rather have some control.
Re: Filter Targlet Repository Contents [message #1837328 is a reply to message #1837320] Wed, 27 January 2021 15:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
Did you know that with the Repository Explorer you can easily create specific requirements, including control over the range via the control on the bottom right and dragging and dropping the 'version' number; Expert Mode lets you see all the capabilities...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Filter Targlet Repository Contents [message #1837349 is a reply to message #1837328] Thu, 28 January 2021 08:24 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
I wasn't too sure about the difference between "Search Eclipse Repositories" and "Search Eclipse Requirements". That said, the Repo Explorer is easily top 3 Eclipse things in the last years. Thanks for that one.

Re: Filter Targlet Repository Contents [message #1837353 is a reply to message #1837349] Thu, 28 January 2021 09:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
Yes, it's pretty subtle. The whole p2 design is rather subtle . You always think "I add a requirement to a bundle or feature", but that's not actually how it works deeper down. There are only installable units and each provide capabilities; it's these capabilities that one requires. So one of the search views searches based on what capabilities are present while the the other searches based on what requirements are present...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Filter Targlet Repository Contents [message #1837361 is a reply to message #1837353] Thu, 28 January 2021 14:10 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
I had all the requirements setup in oomph before I found out about the trick with the "*" wildcard requirement and then set "IncludeAllRequirements" to true, so my .setup has no requirements at all, only repositories... Maytbe that's not so clever if I want to control the resolution externally from the .setup file.

Re: Filter Targlet Repository Contents [message #1837367 is a reply to message #1837361] Thu, 28 January 2021 15:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
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/
Previous Topic:Correctly share Eclipse Product Setup
Next Topic:redirection setups
Goto Forum:
  


Current Time: Tue Dec 07 19:46:22 GMT 2021

Powered by FUDForum. Page generated in 0.01790 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top