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

Create Solver solution #2584

Merged
merged 16 commits into from
Jul 4, 2023
Merged

Conversation

AntoinePrv
Copy link
Member

@AntoinePrv AntoinePrv commented Jun 12, 2023

The new Solution class represents the outcome of a Solver solve, which is now help inside a ::Transaction*.
This PR introduce slowly start rolling it out in mamba::MTransaction.
The MSolver flags are also refactored into a struct.
Other transitory changes are added.

@AntoinePrv AntoinePrv force-pushed the solv-solution branch 3 times, most recently from 4f31204 to 91b3725 Compare June 19, 2023 08:35
@AntoinePrv AntoinePrv self-assigned this Jun 19, 2023
@AntoinePrv AntoinePrv force-pushed the solv-solution branch 2 times, most recently from 45ad4bd to 199d3cd Compare June 20, 2023 09:45
@AntoinePrv AntoinePrv marked this pull request as ready for review June 20, 2023 09:46
@AntoinePrv AntoinePrv requested review from JohanMabille and Klaim June 20, 2023 13:47
@AntoinePrv AntoinePrv force-pushed the solv-solution branch 2 times, most recently from ae35d70 to e204a93 Compare June 26, 2023 12:51
libmamba/include/mamba/core/solver.hpp Outdated Show resolved Hide resolved
libmamba/include/mamba/core/solver.hpp Outdated Show resolved Hide resolved
libmamba/src/core/transaction.cpp Outdated Show resolved Hide resolved
libmamba/include/mamba/core/solver.hpp Show resolved Hide resolved
libmamba/include/mamba/core/solution.hpp Outdated Show resolved Hide resolved
libmamba/include/mamba/core/solver.hpp Show resolved Hide resolved
libmamba/src/core/solution.cpp Outdated Show resolved Hide resolved
libmamba/src/core/solver.cpp Show resolved Hide resolved
@AntoinePrv AntoinePrv force-pushed the solv-solution branch 2 times, most recently from 423dcfa to 2327d40 Compare June 30, 2023 14:39
@AntoinePrv AntoinePrv marked this pull request as draft June 30, 2023 16:13
@AntoinePrv AntoinePrv marked this pull request as ready for review July 3, 2023 09:44
@AntoinePrv AntoinePrv requested a review from Klaim July 3, 2023 09:45
libmamba/src/core/transaction.cpp Outdated Show resolved Hide resolved
libmamba/src/core/transaction.cpp Outdated Show resolved Hide resolved
namespace detail
{
template <typename Action>
auto to_remove_ptr(Action& action)
Copy link
Member

Choose a reason for hiding this comment

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

Why a template here? From the std::visit in the implementation, it looks like you are operating on the type Action defined here

Copy link
Member Author

@AntoinePrv AntoinePrv Jul 4, 2023

Choose a reason for hiding this comment

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

Maybe this is not the idiomatic way of doing this, but this was to deduce the constness of Action, used to deduce the constness of the returned pointer.

namespace detail
{
template <typename Action>
auto to_install_ptr(Action& action)
Copy link
Member

Choose a reason for hiding this comment

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

Same remark here.

libmamba/include/mamba/core/solution.hpp Outdated Show resolved Hide resolved
namespace detail
{
template <typename Action>
auto to_omit_ptr(Action& action)
Copy link
Member

Choose a reason for hiding this comment

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

Same remark as previous regarding the template

libmamba/src/core/solver.cpp Outdated Show resolved Hide resolved
libmamba/src/core/solver.cpp Show resolved Hide resolved
@AntoinePrv AntoinePrv requested a review from JohanMabille July 4, 2023 08:44
@JohanMabille JohanMabille merged commit 5208728 into mamba-org:main Jul 4, 2023
@AntoinePrv AntoinePrv deleted the solv-solution branch July 4, 2023 13:53
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.

3 participants