-
Notifications
You must be signed in to change notification settings - Fork 371
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
Conversation
e77ba7a
to
3778470
Compare
3778470
to
e8d6b3d
Compare
There was a problem hiding this 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.
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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();
There was a problem hiding this comment.
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.
Hey team, JFYI, we have found that this PR introduced some changes in the solver behaviour. More details at #2486. |
For #2302