Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish some property with the IU to support automatic filtering #10

Closed
laeubi opened this issue Feb 7, 2023 · 4 comments
Closed

Publish some property with the IU to support automatic filtering #10

laeubi opened this issue Feb 7, 2023 · 4 comments

Comments

@laeubi
Copy link

laeubi commented Feb 7, 2023

I'm currently think about a feature where Tycho automatically select a JusJ:

Tycho can already filter quite good what will suite a product, but some things must be supplied by the user:

  1. jdk or jre
  2. stripped debug symbols or not

it would therefore be good if the IUs of a JRE can either:

  • define some properties (e.g. jre.type = jdk, jre.debugSymbols=true)
  • define a capability (e.g. java.jdk, java.jre or java.debug)
  • ... some other way that could be quiried / filtered in p2 ...
@merks
Copy link
Contributor

merks commented Feb 8, 2023

I'm currently think about a feature where Tycho automatically select a JusJ:

* [Support automatic installation of a suitable JustJ in a product packaging eclipse-tycho/tycho#2064](https://github.com/eclipse-tycho/tycho/issues/2064)

Tycho can already filter quite good what will suite a product, but some things must be supplied by the user:

1. jdk or jre

JustJ doesn't provide JDKs.

2. stripped debug symbols or not

You can query for the iu with .stripped appended.

it would therefore be good if the IUs of a JRE can either:

* define some properties (e.g. jre.type = jdk, jre.debugSymbols=true)

* define a capability (e.g. `java.jdk`,  `java.jre` or `java.debug`)

* ... some other way that could be quiried / filtered in p2 ...

I think there is already enough information to build an IU ID which can be used as the basis for a query:

org.eclipse.justj.openjdk.hotspot.jre.(full|minimal|base)(.stripped)?

It seems to me that the setup for this is already very minimal, just using standard existing things:

image

The "confusing" steps in the documentation is to a large extent because one has to do it several different ways depending on which version of Tycho is involved.

In any case, I expect that what's available via the current simple naming conventions ought to be sufficient.

@merks
Copy link
Contributor

merks commented Mar 4, 2024

I don't know that anything concrete beyond what's already available is needed.

@merks merks closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@laeubi
Copy link
Author

laeubi commented May 5, 2024

@merks I finally was able to actually implement the feature that would using it here:

As you can see Tycho creates a requirement to JustJ JRE here

(MetadataFactory.createRequirement(TychoConstants.NAMESPACE_JUSTJ, jreName, null, null, false, false)

jreName is currently jre but would be good to allow being more specific, for example if I wanted always a stripped JRE I probably like to use jre.stripped or if I always want a full JRE then jre.full.

Similar might b e useful for the minimal versus base so in the end each JRE would just provide some additional capabilities to better control this.

@laeubi
Copy link
Author

laeubi commented May 5, 2024

From my limited understanding something like this is what I want:

that makes it possible to create a query in P2 that filters for a specific JustJ variant, e.g. like

providedCapabilities.exists(p | p.namespace == 'org.eclipse.justj' && p.name == 'jre.full')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants