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

Use custom function to properly parse matchspec #2433

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

AntoinePrv
Copy link
Member

@AntoinePrv AntoinePrv commented Mar 31, 2023

For #2302

@AntoinePrv AntoinePrv marked this pull request as ready for review March 31, 2023 15:25
@AntoinePrv AntoinePrv requested review from wolfv and JohanMabille and removed request for wolfv March 31, 2023 16:43
Copy link
Member

@Klaim Klaim left a comment

Choose a reason for hiding this comment

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

LGTM but my understanding of the semantics of the modified functions is not completely clear so I recommend getting another approval at least.

Copy link
Member

@JohanMabille JohanMabille left a comment

Choose a reason for hiding this comment

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

Nitpicking remarks, but overall looks good to me.

@@ -18,7 +19,7 @@ namespace mamba
public:

MatchSpec() = default;
MatchSpec(const std::string& i_spec);
MatchSpec(std::string_view i_spec);
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to authorize implicit conversions?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was the current behavior. Leaving a note to change it when this is worked on.

auto x = custom_multichannels.find(needle.name());
if (x != custom_multichannels.end())
{
for (auto el : (x->second))
Copy link
Member

Choose a reason for hiding this comment

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

Nitpicking:

return std::find_if(x->second.begin(), x->second.end(), [chan](const auto& e) {
return make_channel(el) == *chan; }) != x->second.end();

Copy link
Member Author

Choose a reason for hiding this comment

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

This function was moved. I'm leaving it as it is since it needs re-work as well.

@jaimergp
Copy link
Contributor

Hey team, JFYI, we have found that this PR introduced some changes in the solver behaviour. More details at #2486.

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

Successfully merging this pull request may close these issues.

4 participants