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

Add IInstallableUnitQueryable interface to allow easier adaption #348

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Oct 8, 2023

Currently there is only the generic IQueryable but this don't work well in cases where one can't pass type information for the generic e.g. when adapting an object there is no way to pass the parameter T.

This adds a new interface that lock in the type T for a IQueryable that can supply IInstallableUnits.

This is a prerequisite of eclipse-pde/eclipse.pde#207 where I'd like to use the Adapter pattern to support other locations to supply additional Installable units.

Currently there is only the generic IQueryable<T> but this don't work
well in cases where one can't pass type information for the generic e.g.
when adapting an object there is no way to pass the parameter T.

This adds a new interface that lock in the type T for a IQueryable that
can supply IInstallableUnits.
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

Test Results

       9 files  ±0         9 suites  ±0   36m 37s ⏱️ + 2m 5s
2 177 tests ±0  2 173 ✔️ ±0    4 💤 ±0  0 ±0 
6 621 runs  ±0  6 610 ✔️ ±0  11 💤 ±0  0 ±0 

Results for commit d8b0b19. ± Comparison against base commit b9af23d.

@laeubi
Copy link
Member Author

laeubi commented Oct 9, 2023

@merks @mickaelistria @HannesWell any objections merging this (as it is actually new API we should have one additional comiter approval). I think there should neither compatibility nor maintain concerns of having this simple interface and this currently prevents the PDE verification build from happening.

@laeubi
Copy link
Member Author

laeubi commented Oct 9, 2023

An alternative would be to make this PDE "private" and not general available to P2...

@merks
Copy link
Contributor

merks commented Oct 9, 2023

It seems okay, though I'm not entirely sure why something needed by PDE has to be added to p2...

@laeubi
Copy link
Member Author

laeubi commented Oct 9, 2023

It seems okay, though I'm not entirely sure why something needed by PDE has to be added to p2...

Main purpose is to IMetadataRepository can implement this interface as well (what would be to heavy for general purpose) and its easier to reuse in other context, but as said it could also be done directly in PDE it just seems better placed at P2 (as its interface only).

@merks
Copy link
Contributor

merks commented Oct 9, 2023

I'm fine with whatever you and @HannesWell decide is best...

@laeubi laeubi merged commit 9005901 into eclipse-equinox:master Oct 9, 2023
9 checks passed
@laeubi
Copy link
Member Author

laeubi commented Oct 9, 2023

Then lets go so it is available in tomorrows i-build

HannesWell added a commit to HannesWell/p2 that referenced this pull request Oct 24, 2023
HannesWell added a commit to HannesWell/p2 that referenced this pull request Oct 24, 2023
HannesWell added a commit that referenced this pull request Oct 26, 2023
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

Successfully merging this pull request may close these issues.

2 participants