Skip to content

Conversation

@sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Aug 16, 2021

Fixes: #3057
Fixes: #3038
Fixes: #3028

I am not sure what was exactly meant by having the case (range.min.isPreRelease && range.max == range.min.nextBreaking) but it seems not. quite right.

>=0.9.0-1 < 0.10.0 would get translated to ^0.9.0-1. But ^0.9.0-1 in pub_semver is the same as >=0.9.0-1 < 0.10.0-0, and that is what gets captured by the first part of the condition: range.max == range.min.nextBreaking.firstPreRelease.

@jonasfj
Copy link
Member

jonasfj commented Aug 30, 2021

>=0.9.0-1 < 0.10.0 would get translated to ^0.9.0-1. But ^0.9.0-1 in pub_semver is the same as >=0.9.0-1 < 0.10.0-0, and that is what gets captured by the first part of the condition: range.max == range.min.nextBreaking.firstPreRelease.

I imagine this was intended to catch the case where: >= 0.10.0-1 <0.10.0 can be translated to ^0.10.0-1.

I'm guessing we'll need something like: (requiring us to add Version.withoutPreRelease or auxiliary function)

    if (range.max == range.min.nextBreaking.firstPreRelease ||
        (range.min.isPreRelease && range.max == range.min.withoutPreRelease)) {

@sigurdm Does that make sense?

EDIT: Resolved in chat, no this doesn't make sense.

Copy link
Member

@jonasfj jonasfj left a comment

Choose a reason for hiding this comment

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

I think this is correct, but that we could probably fix the bug that is the original intent here, if we wanted to -- see previous comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite loop in the solver Bad state: [BUG] firebase_messaging ^8.0.0-dev.7 is not satisfied.

2 participants