Skip to content

Update Gherkin/Cucumber Dependencies#656

Draft
laeubi wants to merge 1 commit into
cucumber:mainfrom
laeubi:update_dependencies
Draft

Update Gherkin/Cucumber Dependencies#656
laeubi wants to merge 1 commit into
cucumber:mainfrom
laeubi:update_dependencies

Conversation

@laeubi

@laeubi laeubi commented May 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mpkorstanje mpkorstanje left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If that doesn't help, can you flag me in the issue where you have the actual problem?

See here:

I tried to update everything to the latest version but getting:

Error:  Could not resolve version conflict among [
io.cucumber.eclipse:io.cucumber.eclipse.java.plugins:jar:3.0.0-SNAPSHOT -> io.cucumber:messages:jar:30.1.0,
io.cucumber.eclipse:io.cucumber.eclipse.java.plugins:jar:3.0.0-SNAPSHOT -> io.cucumber:messages:jar:32.3.1,
io.cucumber.eclipse:io.cucumber.eclipse.editor:jar:3.0.0-SNAPSHOT -> io.cucumber:messages:jar:32.3.1,
io.cucumber:gherkin:jar:36.1.0 -> io.cucumber:messages:jar:[19.1.4,31.0.0), io.cucumber:messages:jar:30.1.0,
io.cucumber:messages-ndjson:jar:0.4.1 -> io.cucumber:messages:jar:[32.0.0,33.0.0),
io.cucumber:messages:jar:32.3.1, io.cucumber:gherkin-utils:jar:11.0.0 -> io.cucumber:messages:jar:[32.0.0,33.0.0)]

If I decode this right

io.cucumber:gherkin:jar:36.1.0 requires io.cucumber:messages:jar:[19.1.4,31.0.0) but io.cucumber:gherkin-utils:jar:11.0.0 wants io.cucumber:messages:jar:[32.0.0,33.0.0) what has no intersection.

So currently there seem to be no grantee that gherkin-utils depends on "compatible" gherkin (because its only a test-dependency) what sounds a bit strange.

Originally posted by @laeubi in cucumber/gherkin-utils#171 (comment)

There is a watershed around messages v32 because of some breaking changes. I'm lining those up to release with cucumber-jvm v8.

So you either have to use a set of dependencies which depend messages before 32 or after. Because of the breaking changes you can't mix and match those. Now I can't immediately get a clear picture of the dependency tree, but it looks like it includes cucumber-jvm. Because v8 is not yet released, you'd have to use the v7 set of dependencies.

The current and previous set of converging versions can be found in the cucumber-bom.

org.eclipse.e4.ui.css.swt.theme,
org.eclipse.ui.genericeditor,
io.cucumber.gherkin;bundle-version="16.0.0",
io.cucumber.messages;bundle-version="13.2.1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Btw, these versions look a bit old.

org.eclipse.core.expressions;bundle-version="3.9.500"
org.eclipse.core.expressions;bundle-version="3.9.500",
io.cucumber.gherkin.utils;bundle-version="11.0.0",
io.cucumber.cucumber-gherkin;bundle-version="7.33.0"

@mpkorstanje mpkorstanje May 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This conflicts with gherkin.utils.

And do you need io.cucumber.cucumber-gherkin? I wrote that mostly as an internal adaptor so I didn't have to rewrite everything when introducing messages. It will eventuallyTM fade out.

Ideally you'd use io.cucumber.gherkin here instead.

</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>messages-ndjson</artifactId>

@mpkorstanje mpkorstanje May 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

With messages-ndjson do you still need the jackson dependencies above?

<artifactId>cucumber-expressions</artifactId>
<version>18.0.1</version>
<artifactId>cucumber-core</artifactId>
<version>7.34.3</version>

@mpkorstanje mpkorstanje May 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This version isn't compatible with messages-ndjson further down in this file. You'd need the unreleased v8 version here or downgrade messages-ndjson.

@mpkorstanje

Copy link
Copy Markdown
Member

Mmh. It also looks like gherkin-utils didn't get a release for every major release of gherkin. So the set of dependencies used by cucumber-jvm v7.34.3 isn't compatible with any gherkin-utils. 😅

@laeubi I'm assuming you want the set of dependencies that is compatible with cucumber-jvm v7.34.3. If so, can you setup cucumber-eclipse to use those as much as possible. Then from the version constraints/complaints maven gives us we can probably work out what we have to backport in gherkin-utils.

@laeubi

laeubi commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@mpkorstanje thanks I'll try to sort this out - maybe I can eben try using the bom - should work theoretically but haven't tried that lately :-)

@laeubi

laeubi commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

@mpkorstanje I'm currently looking at https://repo1.maven.org/maven2/io/cucumber/cucumber-bom/7.34.3/cucumber-bom-7.34.3.pom and it seems to depend on some properties for the versions, even though that works its often easier for consumption if these properties are resolved e.g. with https://www.mojohaus.org/flatten-maven-plugin/flatten-mojo.html

@laeubi

laeubi commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Sadly the bom feature is currently broken in m2e ...
I created a fix for this now here:

@mpkorstanje mpkorstanje changed the title Update Gherking/Cucumber Dependencies Update Gherkin/Cucumber Dependencies May 16, 2026
@mpkorstanje

Copy link
Copy Markdown
Member

@laeubi the flatten-maven-plugin doesn't work as described. Specifically it doesn't flatten the properties. It also appends /cucumber-bom to every url. I don't think it is a good idea to use this plugin.

I suppose I could manually inline the versions.

But why are properties problematic anyway?

@laeubi

laeubi commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

I now tried with the bom but it also seems to be inconsistent regarding versions when it comes to messages package imports.

[ERROR] Cannot resolve dependencies of project io.cucumber.eclipse:io.cucumber.eclipse.java.plugins:eclipse-plugin:3.0.0-SNAPSHOT
[ERROR]  with context {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86_64, org.eclipse.update.install.sources=true}
[ERROR]   Software being installed: io.cucumber.eclipse.java.plugins 3.0.0.qualifier
[ERROR]   Missing requirement: io.cucumber.messagesn.ndjson 0.3.2 requires 'java.package; io.cucumber.messages [31.2.0,32.0.0)' but it could not be found
[ERROR]   Cannot satisfy dependency: io.cucumber.cucumber-core 7.34.3 depends on: java.package; io.cucumber.messages.ndjson [0.3.0,1.0.0)
[ERROR]   Cannot satisfy dependency: io.cucumber.eclipse.java.plugins 3.0.0.qualifier depends on: osgi.bundle; io.cucumber.cucumber-core 0.0.0: See log for details

The messages is included as version 30 in the bom, but ndjson at version 0.3.2 does not include it in the (OSGi) version range as its already at 31. Beside that gherking-util is not part of the bom so needs to be added additionally.

I'll try to take a look how I possibly can resolve this or if I should possibly just wait for the next bom release where things are then hopefully more aligned.

@mpkorstanje mpkorstanje self-requested a review June 1, 2026 19:25
@mpkorstanje

mpkorstanje commented Jun 1, 2026

Copy link
Copy Markdown
Member
[ERROR]   Missing requirement: io.cucumber.messagesn.ndjson 0.3.2 requires 'java.package; io.cucumber.messages [31.2.0,32.0.0)' but it could not be found`

I don't get this part. The range in the pom is [18.0.0,32.0.0).

https://github.com/cucumber/messages-ndjson/blob/release/v0.3.2/java/pom.xml

I also don't understand this part:

[ERROR]   Cannot satisfy dependency: io.cucumber.cucumber-core 7.34.3 depends on: java.package; io.cucumber.messages.ndjson [0.3.0,1.0.0)

Because cucumber-jvm uses a fixed version in the bom here:

https://github.com/cucumber/cucumber-jvm/blob/v7.34.3/cucumber-bom/pom.xml

@laeubi

laeubi commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

I don't get this part. The range in the pom is [18.0.0,32.0.0).

This is the version range in the pom, yes but it is not used as the OSGi import package could be adjusted maybe, but still it seems the bom includes things that depend on different messages versions. I need to think about how one could possibly best manage this.

I also don't understand this part

That's likely only a follow up because the first one can not be resolved.

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