fix: ordering of dev and post components#2299
Open
JeanChristopheMorinPerso wants to merge 1 commit intoconda:mainfrom
Open
fix: ordering of dev and post components#2299JeanChristopheMorinPerso wants to merge 1 commit intoconda:mainfrom
JeanChristopheMorinPerso wants to merge 1 commit intoconda:mainfrom
Conversation
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
baszalmstra
reviewed
Mar 30, 2026
| } | ||
|
|
||
| #[test] | ||
| fn dev_is_only_special_for_exact_runs() { |
Collaborator
There was a problem hiding this comment.
I think we also have checks to see if something is a dev version? Maybe we can assert those too here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a small bug with
devandpostcomponents in versions that I found while working on adding version interval ranges support to rattler.Basically, I found that rattler was considering a version
1.2devdevto be smaller than1.2dev. This I think is wrong based on https://github.com/conda/ceps/blob/main/cep-0033.md andconda.models.version.VersionOrderagrees with that.The same problem also happened with the
postcomponent, but in reverse.while in conda:
The problem seem to stem from the fact that
tag_no_casekind of matched on the prefix, I think. I'm still very new to rust, so I might be wrong. But the fix seems legit to me.The docs on
tag_no_casesay (emphasis mine):(https://docs.rs/nom/latest/nom/bytes/fn.tag_no_case.html)
How Has This Been Tested?
AI Disclosure
Tools: Amp (see https://ampcode.com/threads/T-019d36ed-fd10-7368-b400-481c3646f900, in this case it used gpt 5.4 in its deepest thinking mode)
Checklist: