Skip to content

Add getAdditionalEntries to IClasspathContributor#1845

Merged
laeubi merged 1 commit intoeclipse-pde:masterfrom
steffenschmitt1:master
Jul 30, 2025
Merged

Add getAdditionalEntries to IClasspathContributor#1845
laeubi merged 1 commit intoeclipse-pde:masterfrom
steffenschmitt1:master

Conversation

@steffenschmitt1
Copy link
Copy Markdown
Contributor

Currently, it is only possible to add classpath entries at the beginning of the calculation process. However, in order to properly take AccessRule.IgnoreIfBetter into account from all other entries, it is necessary to add entries at the end of the calculation.

This PR introduces a new method that allows classpath contributors to append additional entries at the end of the calculation process, enabling more accurate handling of access rules.

@laeubi
Copy link
Copy Markdown
Contributor

laeubi commented Jun 30, 2025

@steffenschmitt1 I also noticed that IClasspathContributor is sometimes a bit hard to use. Can you maybe give an example for when this has to be used? Maybe PDE itself could use that feature as well?

Also to accept your contribution you need to sign the ECA.

@steffenschmitt1
Copy link
Copy Markdown
Contributor Author

What do I need to do regarding the version?
The manifest specifies version 3.21, but it is being flagged as incorrect. And that i should change the Version to 3.21.

And what about the error related to adding the method to the interface?
Since there's a default implementation, it shouldn't be a breaking change.

@laeubi
Copy link
Copy Markdown
Contributor

laeubi commented Jul 9, 2025

This needs to be suppressed here sadly.

Comment thread ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IClasspathContributor.java Outdated
@steffenschmitt1 steffenschmitt1 force-pushed the master branch 4 times, most recently from 07740e2 to 40a25ce Compare July 18, 2025 12:11
Copy link
Copy Markdown
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build seems to fail at comparison of the documentation bundle as baseline and current bundle have the same version but different contents. What I don't understand is that the version of that bundle has been bumped for the current release cycle, so I would expect that baseline and current bundle have different versions. @laeubi do you know anything about that build error?

Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:5.0.0-SNAPSHOT:p2-metadata-default (default-p2-metadata-default) on project org.eclipse.pde.doc.user: baseline and build artifacts have same version but different contents
08:26:01  [ERROR]    no-classifier: different
08:26:01  [ERROR]       reference/api/allclasses-index.html: different
08:26:01  [ERROR]       reference/api/index-files/index-7.html: different
08:26:01  [ERROR]       reference/api/index-files/index-9.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/IClasspathContributor.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/IClasspathContributor2.html: not present in baseline
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/class-use/IClasspathContributor.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/class-use/IClasspathContributor2.html: not present in baseline
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/package-summary.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/package-tree.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/package-use.html: different
08:26:01  [ERROR]       reference/api/overview-tree.html: different

Apart from that, the copyright header for the newly introduced interface would need to be updated.

Comment thread ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IClasspathContributor2.java Outdated
Comment thread ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IClasspathContributor2.java Outdated
@steffenschmitt1 steffenschmitt1 force-pushed the master branch 2 times, most recently from f0e032d to 5721bf9 Compare July 21, 2025 09:48
@steffenschmitt1
Copy link
Copy Markdown
Contributor Author

The build seems to fail at comparison of the documentation bundle as baseline and current bundle have the same version but different contents. What I don't understand is that the version of that bundle has been bumped for the current release cycle, so I would expect that baseline and current bundle have different versions. @laeubi do you know anything about that build error?

Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:5.0.0-SNAPSHOT:p2-metadata-default (default-p2-metadata-default) on project org.eclipse.pde.doc.user: baseline and build artifacts have same version but different contents
08:26:01  [ERROR]    no-classifier: different
08:26:01  [ERROR]       reference/api/allclasses-index.html: different
08:26:01  [ERROR]       reference/api/index-files/index-7.html: different
08:26:01  [ERROR]       reference/api/index-files/index-9.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/IClasspathContributor.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/IClasspathContributor2.html: not present in baseline
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/class-use/IClasspathContributor.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/class-use/IClasspathContributor2.html: not present in baseline
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/package-summary.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/package-tree.html: different
08:26:01  [ERROR]       reference/api/org/eclipse/pde/core/package-use.html: different
08:26:01  [ERROR]       reference/api/overview-tree.html: different

Apart from that, the copyright header for the newly introduced interface would need to be updated.

By upgrading the version of org.eclipse.pde.doc.user, I was able to resolve the issue. However, some tests are still failing, and I don't believe my changes should have any impact on the executable that is reported as missing in those failures.

@laeubi
Copy link
Copy Markdown
Contributor

laeubi commented Jul 21, 2025

@laeubi do you know anything about that build error?

The forcequalifierupdate file must be enhanced when new API is added.

@steffenschmitt1 steffenschmitt1 force-pushed the master branch 3 times, most recently from ce8b02e to aa682b5 Compare July 23, 2025 12:12
Copy link
Copy Markdown
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks fine for me, anyone else has concerns or should we merge it?

@laeubi
Copy link
Copy Markdown
Contributor

laeubi commented Jul 26, 2025

@steffenschmitt1 sadly in the meanwhile there is a merge conflict, please rebase on master and resolve the conflict then from my side everything seems fine.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 27, 2025

Test Results

33 files   -    732  33 suites   - 732   22s ⏱️ - 54m 28s
26 tests  -  3 585  26 ✅  -  3 531  0 💤  -  54  0 ❌ ±0 
79 runs   - 10 755  79 ✅  - 10 592  0 💤  - 163  0 ❌ ±0 

Results for commit 6f14ebf. ± Comparison against base commit 4c4ad88.

This pull request removes 3585 tests.
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_importPackage
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeFragments
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeFragmentsProvidingPackages
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeNonTestFragments
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeOptional
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requireBundle
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requireBundle2
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requireDifferentVersions
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requiredCapability
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requirementsOfTransitivlyRequiredFragment
…

♻️ This comment has been updated with latest results.

@laeubi
Copy link
Copy Markdown
Contributor

laeubi commented Jul 27, 2025

I have documented the testfailure here:

Adds a new method to allow classpath contributor to append additional
classpath entries at the end of the calculation process.
@laeubi laeubi merged commit 6dc51e2 into eclipse-pde:master Jul 30, 2025
17 of 18 checks passed
@laeubi
Copy link
Copy Markdown
Contributor

laeubi commented Jul 30, 2025

@steffenschmitt1 thanks for the enhancement and congratulation for your first PDE contribution 🥇

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