Skip to content

Prefer URIs with authority#3098

Merged
mpkorstanje merged 6 commits into
mainfrom
fix-include-authority-in-uri
Oct 15, 2025
Merged

Prefer URIs with authority#3098
mpkorstanje merged 6 commits into
mainfrom
fix-include-authority-in-uri

Conversation

@mpkorstanje

@mpkorstanje mpkorstanje commented Oct 15, 2025

Copy link
Copy Markdown
Member

⚡️ What's your motivation?

There are two ways to obtain a URI of a file:

  • File.toURI() -> file:/path/to/file.feature
  • Path.toUri() -> file:///path/to/file.feature

While both URIs are equal, their string representation is not. This poses some problems when comparing string based outputs. Currently, when using the Cucumber JUnit Platform Engine the latter variant is used. When using the CLI the former variant is used. The choice between the two is fairly arbitrary. But the latter seems to picked up by IDEA and turned into a clickable link. The former is not.

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

📋 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.

There are two ways to obtain a URI of a file:

* `File.toURI()` -> `file:/path/to/file.feature`
* `Path.toUri()` -> `file:///path/to/file.feature`

While both URIs are equal, their string representation is not. This
poses some problems when comparing string based outputs.

Currently, when using the Cucumber JUnit Platform Engine the latter
variant is used. When using the CLI the former variant is used.

The choice between the two is fairly arbitrary. But the latter seems to
picked up by IDEA and turned into a clickable link. The former is not.
@mpkorstanje mpkorstanje marked this pull request as ready for review October 15, 2025 15:18
@mpkorstanje mpkorstanje merged commit c53ddd7 into main Oct 15, 2025
6 checks passed
@mpkorstanje mpkorstanje deleted the fix-include-authority-in-uri branch October 15, 2025 15:54
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.

1 participant