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

Versions with characters in them show false positives #110

Open
annedroiid opened this issue Nov 30, 2021 · 0 comments · May be fixed by #142
Open

Versions with characters in them show false positives #110

annedroiid opened this issue Nov 30, 2021 · 0 comments · May be fixed by #142

Comments

@annedroiid
Copy link

I have an internal library that I'm using in a project that doesn't have a full release yet, so it's version it still in the form 0.0.0+123. It looks like under the hood sbt is encoding the +, so the version is seen to be 0.0.0%2B123 rather than 0.0.0+123.

This means that when this plugin does the dependency checks it thinks that the encoded version (0.0.0%2B123) is undeclared, and that the non-encoded version (0.0.0+123) isn't being used.

andyjayne added a commit to andyjayne/sbt-explicit-dependencies that referenced this issue Nov 30, 2023
This test checks whether the plugin correctly handles
dependencies where the version contains a + character. The
character is commonly used in semver version strings to add
build metadata to the version. Per https://semver.org/

Currently this test fails as the plugin is comparing the
following version strings that do not match:

7.2.27+33-04a1ea9e-SNAPSHOT
7.2.27%2B33-04a1ea9e-SNAPSHOT

Reproduces: cb372#110
andyjayne added a commit to andyjayne/sbt-explicit-dependencies that referenced this issue Nov 30, 2023
Update how version is parsed for pom files in the jar file
to dependency logic to to cater for characters that are valid
in version strings but encoded in the file path.
For example, "+" which is used for semver metadata, encoded as
"%2B".

Before this change 7.2.27+33-04a1ea9e-SNAPSHOT version string
was not handled consistently and would result in different
values in the declared/used compile dependencies.

Fixes: cb372#110
@andyjayne andyjayne linked a pull request Nov 30, 2023 that will close this issue
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 a pull request may close this issue.

1 participant