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 libsolv.Database Bindings and tests #3186

Merged
merged 5 commits into from
Feb 12, 2024

Conversation

AntoinePrv
Copy link
Member

No description provided.

@AntoinePrv AntoinePrv added the release::enhancements For enhancements PRs or implementing features label Feb 9, 2024
@@ -303,6 +306,12 @@ namespace mamba::fs
return to_utf8(m_path);
}

// Returns a default encoded string.
const std::string& native() const
Copy link
Member Author

Choose a reason for hiding this comment

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

@Klaim I needed to add this function for pybind11, as it calls it and does utf-8 translation itself.
Is that OK?

Copy link
Member

Choose a reason for hiding this comment

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

As long as it does what the standard does, that is returning the real native encoding of that the path use on that system, yes it's OK

I believe we didnt set this function to discourage trying to use something else than utf-8 with our library, but it's still just reflecting what the sandard does otherwise.

Comment on lines +44 to +51
if (src)
{
return make_caster<T>::cast(std::forward<Expected>(src).value(), policy, parent);
}
else
{
throw std::forward<Expected>(src).error();
}
Copy link
Member Author

Choose a reason for hiding this comment

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

tl::expected now throws on unexpected cases.

template <typename TT>
friend auto operator==(const conflict_map<TT>& lhs, const conflict_map<TT>& rhs) -> bool;
template <typename TT>
friend auto operator!=(const conflict_map<TT>& lhs, const conflict_map<TT>& rhs) -> bool;
Copy link
Member

Choose a reason for hiding this comment

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

Nitpicking: Only operator== has to be friend

@AntoinePrv AntoinePrv marked this pull request as ready for review February 12, 2024 13:47
@AntoinePrv AntoinePrv merged commit 00219a5 into mamba-org:main Feb 12, 2024
28 checks passed
@AntoinePrv AntoinePrv deleted the solver-bind branch February 12, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release::enhancements For enhancements PRs or implementing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants