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

Solver Request #3141

Merged
merged 21 commits into from
Jan 23, 2024
Merged

Solver Request #3141

merged 21 commits into from
Jan 23, 2024

Conversation

AntoinePrv
Copy link
Member

@AntoinePrv AntoinePrv commented Jan 19, 2024

A new libsolv independent interface for passing jobs to the Solver.

@AntoinePrv AntoinePrv marked this pull request as ready for review January 22, 2024 18:09
@@ -94,8 +92,6 @@ namespace mamba

[[nodiscard]] const std::vector<specs::MatchSpec>& install_specs() const;
[[nodiscard]] const std::vector<specs::MatchSpec>& remove_specs() const;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a typedef would make it easier to read

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 already here, planning to remove it in another PR.

libmamba/include/mamba/core/solver.hpp Outdated Show resolved Hide resolved
libmamba/src/api/channel_loader.cpp Show resolved Hide resolved
libmamba/src/api/channel_loader.cpp Outdated Show resolved Hide resolved
libmamba/src/api/install.cpp Show resolved Hide resolved
PrefixData& prefix_data,
std::vector<std::string> specs,
bool no_pin,
bool no_py_pin
Copy link
Member

@JohanMabille JohanMabille Jan 23, 2024

Choose a reason for hiding this comment

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

  • What does no_py_pin means (I guess it's for the python interpreter, but that could be for python packages), and why do we have a specific handling for it?
  • Can we imagine that in the future, more specific pinning handling would be required? In that case, maybe passing a "pin" structure instead of a bunch of boolean values coulb be safer.
  • no_pin => no_gin =====>[] 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

It's one of the CLI option --no-py-pin,--py-pin{false} Do not automatically pin Python. Why? Conda.
Yes, we should definitly handle all that Python stuff in a more generic way, also true for pip_as_python_dependency things which should really be a recommend or something.

For now I'm just trying to change the solver.

{
if (first)
{
out << "\nPinned packages:\n\n";
Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine to always print this at the beginning, even if the request contains no pinned packages. That would simplify a bit this function, and still give the explicit information that there is no pinned packages in the log (making easier to detect an accidental drop of the call to this funciton in a further refactoring).

Copy link
Member Author

Choose a reason for hiding this comment

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

Going for the status quo here since it was not the point of the PR.

libmamba/src/api/install.cpp Outdated Show resolved Hide resolved
@AntoinePrv AntoinePrv merged commit a190d93 into mamba-org:main Jan 23, 2024
27 checks passed
@AntoinePrv AntoinePrv deleted the solver branch January 23, 2024 12:38
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

2 participants