You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"replacements" (in cargo the patch section and the replace) are a way to substitute the code for one package with some other code. In dart it is called dependency-overrides
This issue is to split off and continue the conversation from pubgrub-rs/pubgrub#39.
The text was updated successfully, but these errors were encountered:
It seems that a patch replaces directly the list of existing versions of a package by one explicitely provided in the patch. I tend to believe this is then just a matter of doing exactly that a DependencyProvider implementation.
Replace
Are the versions specified authorized to be new (non-existing in crates)? If not, this is just a matter of adjusting the get_dependencies method of a DependencyProvider implementation. If yes, it also needs to adjust the list_available_versions.
I think the bugs in Cargo's resolver have to do with the fact that a selected version can report its package name, but with "replacements" that may not be the same as the name the dependency asked for. In pubgrub, thanks to @mpizenberg's foresight to use generics, we know that we never rely on V.get_package() == P for anything, as we did not ask for a get_package method.
As such I think you are wright, it is just technical complexity in the implementation of a DependencyProvider
"replacements" (in cargo the patch section and the replace) are a way to substitute the code for one package with some other code. In dart it is called dependency-overrides
This issue is to split off and continue the conversation from pubgrub-rs/pubgrub#39.
The text was updated successfully, but these errors were encountered: