cucumber / cucumber-jvm

Cucumber for the JVM
https://cucumber.io
MIT License
2.7k stars 2.02k forks source link

[Core] Support nested jar file systems #2830

Closed mpkorstanje closed 9 months ago

mpkorstanje commented 9 months ago

🤔 What's changed?

Spring Boot 3.2 changed the URL format of their nested jars[1] to be more compliant with JDK expectations. They now represented nested jars as their own nested scheme rather than the file scheme. This allows these URLs to be used seamlessly with FileSystems.newFileSystem.

Unfortunately the workarounds for Spring Boot 3.1 did not account for this.

Additionally, our jar uri parsing assumed naively that there would only be a single !/ in a regular jar uri. However, jar uris are recursively defined as[2]:

jar:<url>!/[<entry>]

And while this should allow Cucumber to discover resources in nested jars as well it does seem that Spring Boot 3.2 still has some issues[3].

  1. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes
  2. https://www.iana.org/assignments/uri-schemes/prov/jar
  3. https://github.com/spring-projects/spring-boot/issues/38595

Closes: #2828

🏷️ What kind of change is this?

📋 Checklist:

codecov[bot] commented 9 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3ae7af5) 84.95% compared to head (bea8cca) 84.97%.

Files Patch % Lines
...ucumber/core/resource/JarUriFileSystemService.java 85.71% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2830 +/- ## ============================================ + Coverage 84.95% 84.97% +0.01% - Complexity 2724 2728 +4 ============================================ Files 331 331 Lines 9539 9545 +6 Branches 916 917 +1 ============================================ + Hits 8104 8111 +7 + Misses 1110 1109 -1 Partials 325 325 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.