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

CDT 11.3 does not have BREE header in MANIFEST.MF, uses Require-Capability, causes false positive API Compatibility errors #551

Closed
jonahgraham opened this issue Sep 14, 2023 · 7 comments · Fixed by #554

Comments

@jonahgraham
Copy link
Member

Perhaps as a result of updating Tycho upgrade the CDT 11.3 manifests publish with:

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=17))"

automatically converted from BREE:

Bundle-RequiredExecutionEnvironment: JavaSE-17

This leads to false positive API errors like this:

2023-09-13T22:28:04.9985777Z [API ERROR] File MANIFEST.MF at line 5: The minor version should be incremented in version 8.3.0, since execution environments have been changed since version 8.3.0 (location: /home/runner/work/cdt/cdt/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF)

@jonahgraham
Copy link
Member Author

I suspect the easiest thing short term is to add API filters for this error, but I need to track this back to Tycho and/or PDE to resolve fully.

@akurtakov
Copy link
Contributor

This is PDE issue for sure as BREE is deprecated by OSGi for years although PDE never made the move.

@Kummallinen
Copy link
Contributor

Kummallinen commented Sep 14, 2023

I'm using Tycho 4.0.1 to build our IDE and we still have Bundle-RequiredExecutionEnvironment headers in manifests of the built jar files

@Kummallinen
Copy link
Contributor

Kummallinen commented Sep 14, 2023

@jonahgraham Looking at the differences in the CDT pom & my local ones, I think the difference causing this is I have "<deriveHeaderFromSource>false</deriveHeaderFromSource>" in the tycho-packaging-plugin configuration. See https://github.com/eclipse-tycho/tycho/blob/master/RELEASE_NOTES.md#new-parameter-in-tycho-packaging-pluginpackage-plugin

jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 14, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 14, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 14, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 14, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 14, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 14, 2023
With BREE back on in eclipse-cdt#551 we bump all affected bundles so make
sure we republish updated versions in 11.4

Part of eclipse-cdt#548
Part of eclipse-cdt#551
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 14, 2023
Includes adding API error filters for the places
where PDE does not detect Require-Capability in
place of BREE.

With BREE back on we bump all affected bundles so make
sure we republish updated versions in 11.4

Fixes eclipse-cdt#551
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
Includes adding API error filters for the places
where PDE does not detect Require-Capability in
place of BREE.

With BREE back on we bump all affected bundles so make
sure we republish updated versions in 11.4

Fixes eclipse-cdt#551
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
To workaround eclipse-cdt#551 we need to make a CDT 11.3.1 build that
has the BREE restored to use as a baseline for CDT 11.3.2
(if we release that) and CDT 11.4.0
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
This is to workaround the missing BREE in CDT 11.3.0, see
eclipse-cdt#551 for details

Part of eclipse-cdt#551
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
This is to workaround the missing BREE in CDT 11.3.0, see
eclipse-cdt#551 for details

Part of eclipse-cdt#551
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 15, 2023
This happened to work before because the contents of
api-baseline.repo was in api-baseline.repo.simrel so
the error in the pom.xml went undetected until
eclipse-cdt#551 issue meant api-baseline.repo wasn't in
api-baseline.repo.simrel
@jonahgraham
Copy link
Member Author

The final resolution of this:

Last question, should we publish 11.3.1 fully (i.e. add it to https://download.eclipse.org/tools/cdt/releases/11.3/ composite) or just add a note as to why it is excluded. My current preference is the latter, but I am open to suggestions!

@jonahgraham jonahgraham reopened this Sep 15, 2023
@Kummallinen
Copy link
Contributor

I'd vote for not publishing 11.3.1 and just adding a note. Future updates will still work so there doesn't seem to be any need to cause an extra update for users.

@jonahgraham
Copy link
Member Author

Done in 78e1520 and https://ci.eclipse.org/cdt/job/promote-files-to-download/ has been run to copy the files to https://download.eclipse.org/tools/cdt/releases/11.3/

davmac314 pushed a commit to davmac314/cdt that referenced this issue Sep 24, 2023
davmac314 pushed a commit to davmac314/cdt that referenced this issue Sep 24, 2023
davmac314 pushed a commit to davmac314/cdt that referenced this issue Sep 24, 2023
This is to workaround the missing BREE in CDT 11.3.0, see
eclipse-cdt#551 for details

Part of eclipse-cdt#551
davmac314 pushed a commit to davmac314/cdt that referenced this issue Sep 24, 2023
This happened to work before because the contents of
api-baseline.repo was in api-baseline.repo.simrel so
the error in the pom.xml went undetected until
eclipse-cdt#551 issue meant api-baseline.repo wasn't in
api-baseline.repo.simrel
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Sep 25, 2023
jonahgraham added a commit to jonahgraham/eclipse-cdt-lsp that referenced this issue Feb 22, 2024
A newer Tycho is needed to enable build and test against more
recent platform.

tycho-packaging-plugin is needed explicitly to ensure that
the headers in MANIFEST.MF are not removed during build. This
ensures cdt-lsp doesn't have this same problem as CDT had recently
eclipse-cdt/cdt#551

The inclusion of tycho-packaging-plugin also contains the missing
source references in the MANIFEST.MF outputs.
jonahgraham added a commit to jonahgraham/eclipse-cdt-lsp that referenced this issue Feb 22, 2024
A newer Tycho is needed to enable build and test against more
recent platform.

tycho-packaging-plugin is needed explicitly to ensure that
the headers in MANIFEST.MF are not removed during build. This
ensures cdt-lsp doesn't have this same problem as CDT had recently
eclipse-cdt/cdt#551

The inclusion of tycho-packaging-plugin also contains the missing
source references in the MANIFEST.MF outputs.
jonahgraham added a commit to jonahgraham/eclipse-cdt-lsp that referenced this issue Feb 22, 2024
A newer Tycho is needed to enable build and test against more
recent platform.

tycho-packaging-plugin is needed explicitly to ensure that
the headers in MANIFEST.MF are not removed during build. This
ensures cdt-lsp doesn't have this same problem as CDT had recently
eclipse-cdt/cdt#551

The inclusion of tycho-packaging-plugin also contains the missing
source references in the MANIFEST.MF outputs.
jonahgraham added a commit to eclipse-cdt/cdt-lsp that referenced this issue Feb 22, 2024
A newer Tycho is needed to enable build and test against more
recent platform.

tycho-packaging-plugin is needed explicitly to ensure that
the headers in MANIFEST.MF are not removed during build. This
ensures cdt-lsp doesn't have this same problem as CDT had recently
eclipse-cdt/cdt#551

The inclusion of tycho-packaging-plugin also contains the missing
source references in the MANIFEST.MF outputs.
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 a pull request may close this issue.

3 participants