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

Add VersionSpec #2502

Merged
merged 20 commits into from
Jul 20, 2023
Merged

Add VersionSpec #2502

merged 20 commits into from
Jul 20, 2023

Conversation

AntoinePrv
Copy link
Member

@AntoinePrv AntoinePrv commented Apr 27, 2023

@AntoinePrv AntoinePrv marked this pull request as draft April 28, 2023 09:42
@AntoinePrv AntoinePrv self-assigned this Jun 27, 2023
@AntoinePrv AntoinePrv force-pushed the specs-version-specs branch 3 times, most recently from 0aadbe0 to 16256ff Compare July 3, 2023 14:35
Comment on lines +437 to +445
if (b.local().empty())
{
return starts_with_three_way(a.version(), b.version());
}
if (auto c = compare_three_way(a.version(), b.version()); c != strong_ordering::equal)
{
return c;
}
return compare_three_way(a.local(), b.local());
return starts_with_three_way(a.local(), b.local());
Copy link
Member Author

Choose a reason for hiding this comment

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

As is done in Conda.

@AntoinePrv AntoinePrv requested review from JohanMabille and Klaim and removed request for JohanMabille July 19, 2023 13:10
@AntoinePrv AntoinePrv marked this pull request as ready for review July 19, 2023 14:59
@AntoinePrv AntoinePrv merged commit 2fe055d into mamba-org:main Jul 20, 2023
20 checks passed
@AntoinePrv AntoinePrv deleted the specs-version-specs branch July 20, 2023 09:41
cvanelteren pushed a commit to cvanelteren/mamba that referenced this pull request Jul 31, 2023
* Add specs::Version default ctor

* Add spec::VersionInterval

* Add VersionSpec

* Add starts_with char overloads

* Partial VersionSpec::parse

* Improve layout

* Remove merge conflict

* Add empty version constructor test

* Add missing headers

* Rewrite VersionSpec in term of VersionPredicate

* Handle empty expressions in Postfix and Infix parsers

* Add tests and fix to VersionSpec::parse

* Add util_string is_punct

* Add VersionPredicate::not_starts_with

* Fix Version::starts_with

* Refactor VersionSpec::parse to better handle globs

* Add Version and VersionSpec litterals

* Fix '*' and '~=1.1' cases in VersionSpec::parse

* Refactor VersionSpec tests and add conda tests

* Fix std::max overload on MSVC
cvanelteren pushed a commit to cvanelteren/mamba that referenced this pull request Aug 29, 2023
* Add specs::Version default ctor

* Add spec::VersionInterval

* Add VersionSpec

* Add starts_with char overloads

* Partial VersionSpec::parse

* Improve layout

* Remove merge conflict

* Add empty version constructor test

* Add missing headers

* Rewrite VersionSpec in term of VersionPredicate

* Handle empty expressions in Postfix and Infix parsers

* Add tests and fix to VersionSpec::parse

* Add util_string is_punct

* Add VersionPredicate::not_starts_with

* Fix Version::starts_with

* Refactor VersionSpec::parse to better handle globs

* Add Version and VersionSpec litterals

* Fix '*' and '~=1.1' cases in VersionSpec::parse

* Refactor VersionSpec tests and add conda tests

* Fix std::max overload on MSVC
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

3 participants