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

Remove hamcrest-core from Eclipse SDK #2343

Closed

Conversation

HannesWell
Copy link
Member

Since hamcrest 2.0 the hamcrest-core artifact is just an empty hull to provide metadata that redirect all references to it to the new only hamcrest 'main' artifact.
Nothing in the SDK should require hamcrest-core anymore, so it can be removed.

Since hamcrest 2.0 the hamcrest-core artifact is just an empty hull to
provide metadata that redirect all references to it to the new only
hamcrest 'main' artifact.
Nothing in the SDK should require hamcrest-core anymore, so it can be
removed.
@merks
Copy link
Contributor

merks commented Sep 13, 2024

I guess we can't remove it because org.junit uses the bundle name according to this recipe:

image

We can change the recipe and produce a new version different only by the qualifier. That seems a bit questionable.

@akurtakov
Copy link
Member

So what is the decision here ? IMO there is no other option but to rely on qualifier only, everything else has bigger negatives.

@HannesWell
Copy link
Member Author

Personally I would be fine by requiring only the joint hamcrest bundle in version 2 or later.
I hope this makes the situation easier for those relying on a re-export as currently it can be quite difficult.
But at the same time I cannot say with absolute certainty that this move will not break anyone.

I would also be fine with just qualifier change or do you think there is a chance there is another junit-4 release in the future? If yes we could simply await that.

@HannesWell
Copy link
Member Author

Btw. to add a bit more context, although this is not directly related, that's an issue asking to migrate JUnit-4 to hamcrest 2.2 respectively away from hamcrest, but it is not completed and I have the impression it never will be:

@akurtakov
Copy link
Member

Looks like hamcrest 3.0 is making its way in the ecosystem starting to cause more problems eclipse-jdt/eclipse.jdt.ui#1672

@pci-mthompson
Copy link

Since I got shutdown on the referenced issue above I'll chime in here. It looks like maybe at least for 2023-12 I was able to get things back to a workable state by adding this explicitly to my Oomph setup files and then doing a clean re-install.

<p2:Requirement
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:p2="http://www.eclipse.org/oomph/p2/1.0"
name="org.hamcrest"
versionRange="[2.2.0,2.3.0)"/>

@akurtakov
Copy link
Member

So hamcrest 3.0 comes from other projects as it's not in https://download.eclipse.org/eclipse/updates/4.33/R-4.33-202409030240/plugins/ and the fault of platform is for not really strong with requirements but when we do we prevent adoption of new versions so it's a tough place to be.

@pci-mthompson
Copy link

I did try to look at PDE and diff pre/post update to see what other feature actually pulled hamcrest 3.0 into the IDE. Unfortunately I couldn't sus it out. :|

@akurtakov
Copy link
Member

I did try to look at PDE and diff pre/post update to see what other feature actually pulled hamcrest 3.0 into the IDE. Unfortunately I couldn't sus it out. :|

https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Fviews%2Ftarget_platform_state.htm is probably good starting point.

@akurtakov
Copy link
Member

@merks would you please rebuild the orbit junit 4 to require hamcrest 3 and with qualifier update only as we should never generate new versions(to reduce the risk of conflicting if upstream releases new version). If someone objects should propose alternative plan, delaying making decisions is only making us spin in circles and losing time.

@HannesWell
Copy link
Member Author

rebuild the orbit junit 4 to require hamcrest 3 and with qualifier update

I think requiring only org.hamcrest in version 2 or later would already be sufficient.

merks added a commit to eclipse-orbit/orbit-simrel that referenced this pull request Sep 29, 2024
- This allows the 3.0.0 version of org.hamcrest to be used, which is a
non-API-breaking version.
- The org.hamcrest 2.2.0 requirement is re-exported.
- This is a qualifier only change to org.junit.

eclipse-platform/eclipse.platform.releng.aggregator#2343
merks added a commit to merks/eclipse.platform.releng.aggregator that referenced this pull request Sep 29, 2024
- The org.hamcrest.core bundle is just an empty hull to provide metadata
that redirects all references to it to the new org.hamcrest bundle that
avoids split packages with the org.hamcrest.library bundle by combining
all the content into a single bundle.
- Nothing in the SDK should require org.hamcrest.core anymore, so it can
be removed.
- A new org.junit bundle from Orbit is needed that requires the
org.hamcrest bundle instead of the org.hamcrest.core bundle.

eclipse-platform#2343
@HannesWell
Copy link
Member Author

Thank you @merks for eclipse-orbit/orbit-simrel@89150d5.

Is there a specific reason why https://github.com/hamcrest/JavaHamcrest/releases/tag/v2.2 required and not just https://github.com/hamcrest/JavaHamcrest/releases/tag/v2.1 or later?
In practice it probably doesn't make a big difference, but since this artifact is old some might appropriate as old versions as possible?

merks added a commit to merks/eclipse.platform.releng.aggregator that referenced this pull request Sep 29, 2024
- The org.hamcrest.core bundle is just an empty hull to provide metadata
that redirects all references to it to the new org.hamcrest bundle that
avoids split packages with the org.hamcrest.library bundle by combining
all the content into a single bundle.
- Nothing in the SDK should require org.hamcrest.core anymore, so it can
be removed.
- A new org.junit bundle from Orbit is needed that requires the
org.hamcrest bundle instead of the org.hamcrest.core bundle.

eclipse-platform#2343
@merks
Copy link
Contributor

merks commented Sep 29, 2024

I'll close this is favor of the new PR I created that is using the new version of org.junit.

@merks merks closed this Sep 29, 2024
merks added a commit that referenced this pull request Sep 29, 2024
- The org.hamcrest.core bundle is just an empty hull to provide metadata
that redirects all references to it to the new org.hamcrest bundle that
avoids split packages with the org.hamcrest.library bundle by combining
all the content into a single bundle.
- Nothing in the SDK should require org.hamcrest.core anymore, so it can
be removed.
- A new org.junit bundle from Orbit is needed that requires the
org.hamcrest bundle instead of the org.hamcrest.core bundle.

#2343
@HannesWell HannesWell deleted the remove-hamcrest-core branch September 29, 2024 12:20
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.

4 participants