Skip to content

Conversation

@mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jul 17, 2025

🤔 What's changed?

Add (optional) location field to the Pickle message.

⚡️ What's your motivation?

Finding the source location of a pickle without having to dive into the Gherkin AST and/or bring in one of the query libraries. Helps with, among other things:

🏷️ What kind of change is this?

  • 💥 Breaking change (incompatible changes to the API)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

@clrudolphi
Copy link
Contributor

In all other objects that contain a Location, by convention, the Location is the first property mentioned and thus the first parameter in the generated constructors. This proposed change has the Location as the last property mentioned; and thus the last parameter in the parameter list. This inconsistency is a bit jarring. Can we move it up to the top of the property list?

@clrudolphi
Copy link
Contributor

For Examples(Scenario Outlines), what is the proper Location of the pickle resulting from the table?

@mpkorstanje
Copy link
Contributor Author

mpkorstanje commented Jul 21, 2025

In all other objects that contain a Location, by convention, the Location is the first property mentioned and thus the first parameter in the generated constructors. This proposed change has the Location as the last property mentioned; and thus the last parameter in the parameter list. This inconsistency is a bit jarring. Can we move it up to the top of the property list?

Sure!

For Examples(Scenario Outlines), what is the proper Location of the pickle resulting from the table?

The pickle location is the same as the location of the example row used to create the pickle. The line of the scenario outline would not uniquely identify the pickle as it could refer to any of the examples in that scenario outline.

This was referenced Nov 10, 2025
@davidjgoss
Copy link
Contributor

davidjgoss commented Nov 18, 2025

Out of interest, why is this bound up with the move to Java 17? Just to group breaking changes in one release?

@mpkorstanje
Copy link
Contributor Author

No. Looks like I copy pasted the content intended for #352 into this issue.

@davidjgoss davidjgoss marked this pull request as ready for review November 18, 2025 16:54
@davidjgoss davidjgoss merged commit c7fed7b into main Nov 18, 2025
36 checks passed
@davidjgoss davidjgoss deleted the add-location-to-pickle branch November 18, 2025 18:08
@davidjgoss davidjgoss mentioned this pull request Nov 19, 2025
7 tasks
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