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

[2.7.1][regression] Neither raw version nor format was specified #876

Closed
fipro78 opened this issue Apr 11, 2022 · 8 comments
Closed

[2.7.1][regression] Neither raw version nor format was specified #876

fipro78 opened this issue Apr 11, 2022 · 8 comments
Labels
🚨 regression Regression compared to previous release - blocks upcoming release and other merges
Milestone

Comments

@fipro78
Copy link
Contributor

fipro78 commented Apr 11, 2022

With Tycho 2.7.1 the APP4MC Platform build breaks on building the 3rd party feature. It shows the following error message:

Execution default-package-feature of goal org.eclipse.tycho:tycho-packaging-plugin:2.7.1:package-feature failed: Neither raw version nor format was specified: null

With a verbose output I can see the following exception:

Caused by: java.lang.IllegalArgumentException: Neither raw version nor format was specified: null
at org.eclipse.equinox.internal.p2.metadata.VersionParser.parse (VersionParser.java:155)
at org.eclipse.equinox.p2.metadata.Version.create (Version.java:96)
at org.eclipse.equinox.p2.metadata.Version.parseVersion (Version.java:164)
at org.eclipse.equinox.p2.publisher.eclipse.FeatureEntry. (FeatureEntry.java:66)
at org.eclipse.equinox.p2.publisher.eclipse.FeatureEntry.createRequires (FeatureEntry.java:43)
at org.eclipse.tycho.p2.target.ArtifactMatcher.getVersionRangeFromImport (ArtifactMatcher.java:89)
at org.eclipse.tycho.p2.target.TargetPlatformBaseImpl.resolveArtifact (TargetPlatformBaseImpl.java:100)
at org.eclipse.tycho.packaging.FeatureXmlTransformer.resolvePluginReference (FeatureXmlTransformer.java:111)
at org.eclipse.tycho.packaging.FeatureXmlTransformer.expandReferences (FeatureXmlTransformer.java:83)
at org.eclipse.tycho.packaging.PackageFeatureMojo.expandVersionQualifiers (PackageFeatureMojo.java:258)
at org.eclipse.tycho.packaging.PackageFeatureMojo.execute (PackageFeatureMojo.java:124)

The feature.xml of the project that fails is located here:
https://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git/tree/features/org.eclipse.app4mc.platform.3rdparty/feature.xml?h=develop

@laeubi laeubi added the 🚨 regression Regression compared to previous release - blocks upcoming release and other merges label Apr 11, 2022
@laeubi
Copy link
Member

laeubi commented Apr 11, 2022

@fipro78 thanks for reporting this, I think this is because Tycho only incompletely implements the require items in a feature because it assumes the version is always present but the doc for feature dependencies says:

Version to match: Optional version specification.
Match Rule: Optional matching rule.

currently Tycho interprets them as required.

@fipro78
Copy link
Contributor Author

fipro78 commented Apr 11, 2022

Actually even the PDE tooling does not set a version on specifying a dependency. So I would assume that this breaks quite a lot of builds. Although interestingly only the platform build breaks, the other module builds work even though there are dependencies specified the same way in features.

@laeubi laeubi pinned this issue Apr 11, 2022
@laeubi
Copy link
Member

laeubi commented Apr 11, 2022

The problem here is that you duplicate requires and plugin definitions, e.g.

<import plugin="org.apache.xml.resolver"/>
and
<plugin id="org.apache.xml.resolver" download-size="0" install-size="0" version="0.0.0" unpack="false"/>

these are equal definitions and you don't need both unless you wan't to restrict the first one, so logically (even if allowed) it does not makes sense here to have both! The first will pin the plugin to the build-version and the second will require the plugin unconditionally.

So I would assume that this breaks quite a lot of builds.

Sad enough there are 250 tests in Tycho an none is covering this case...

@laeubi laeubi changed the title Tycho 2.7.1 breaks APP4MC Platform build [2.7.1][regression] Neither raw version nor format was specified Apr 11, 2022
laeubi added a commit to laeubi/tycho that referenced this issue Apr 11, 2022
@jonahgraham
Copy link
Contributor

these are equal definitions and you don't need both unless you wan't to restrict the first one, so logically (even if allowed) it does not makes sense here to have both! The first will pin the plugin to the build-version and the second will require the plugin unconditionally.

PDE's feature.xml editor make similar duplicate entries when using Compute button on Dependencies tab - I assume that is how such cases got into CDT's code base. Adding version information to the requires section seems to have resolved CDT's case - https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/192642

So I would assume that this breaks quite a lot of builds.

Sad enough there are 250 tests in Tycho an none is covering this case...

A couple of examples in CDT - sorry I didn't try to running 2.7.1 staged before the release - in the past there were calls for testing on tycho-dev, is there a new place such requests for tests is made prior to release?

@laeubi
Copy link
Member

laeubi commented Apr 12, 2022

PDE's feature.xml editor make similar duplicate entries when using Compute button on Dependencies tab

Yeah I think that's the root cause for those entries, nerveless tycho must support this and its unlikely PDE will change the behavior.

sorry I didn't try to running 2.7.1 staged before the release in the past there were calls for testing on tycho-dev, is there a new place such requests for tests is made prior to release?

No problem, we have switched to a more "lightweight" approach testing the SNAPSHOTS that is less work but has some chance of missing things of course, but we could more easily in-cooperate bugfixes and do more releases.

We announce this "call for testing" now in the discussions section (see for example #819) you can watch these with Watch > Custom > Discussion in the upper right of a github project.

Beside that, the best way is to have a job that uses the current tycho snapshot build (e.g. run once a day) and try to contribute
an integration-test for any issue so we can make sure it never happens again.

@laeubi
Copy link
Member

laeubi commented Apr 12, 2022

A build is running for a 2.7.2-SNAPSHOT that should fix the issue please tests if possible if that fixes the problems you are seeing:

https://ci.eclipse.org/tycho/job/tycho-github/job/tycho-2.7.x/28/

@laeubi laeubi added this to the 2.7.2 milestone Apr 13, 2022
@laeubi
Copy link
Member

laeubi commented Apr 22, 2022

@jonahgraham @fipro78 Tycho 2.7.2 is about to be released including a fix for this, please help testing: #903

@jonahgraham
Copy link
Contributor

I verified this in the by reverting the previous workaround I had put in to CDT and building with 2.7.2-SNAPSHOT.

@laeubi laeubi unpinned this issue May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 regression Regression compared to previous release - blocks upcoming release and other merges
Projects
None yet
Development

No branches or pull requests

3 participants