Skip to content

Fixes sbt/sbt#6496 - bug in version parser #377

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

Merged
merged 1 commit into from
May 15, 2021

Conversation

Nirvikalpa108
Copy link

What is the problem?

sbt/sbt#6496 identifies a bug in the logic which assesses whether different versions of the same transitive dependency are binary compatible.

If one of the transitive dependencies included a version with a full-stop literal, it would be parsed incorrectly and an error would be thrown to the user falsely saying that the dependencies are binary incompatible.

What is the solution?

This PR fixes the regex used by the parser to include full-stop literals.

Is there anything else to be done?

It is worth us checking the rest of the codebase in case this bug might exist in other parsing functions. The tests are super helpful for figuring out which strings might break the current logic 👍🏽.

What is the problem?
sbt/sbt#6496 identifies a bug in the logic which assesses whether
different versions of the same transitive dependency are binary
compatible. If one of the transitive dependencies included a version
with a full-stop literal, it would be parsed incorrectly and an error
would be thrown to the user falsely saying that the dependencies are
binary incompatible.

What is the solution?
This PR fixes the regex used by the parser to include full-stop literals.

Is there anything else to be done?
It is worth us checking the rest of the codebase in case this bug might
exist in other parsers. The tests are super helpful for figuring out
which strings might break the current logic.
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Thanks Amina!

@eed3si9n eed3si9n merged commit af46c23 into sbt:develop May 15, 2021
eed3si9n added a commit to eed3si9n/librarymanagement that referenced this pull request May 15, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Ref sbt#377

Apply the dotted-prerelease tag to SemComparator
"A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version."
eed3si9n added a commit to eed3si9n/librarymanagement that referenced this pull request May 15, 2021
@eed3si9n
Copy link
Member

It is worth us checking the rest of the codebase in case this bug might exist in other parsing functions.

Here's my follow-up on similar version parsing code - #378

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.

None yet

2 participants