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
When creating an alias package with conan alias it is easy to mix up the order of parameters:
Correct: conan alias boost/ALIAS@conan/stable boost/1.69.0@conan/stable
Wrong: conan alias boost/1.69.0@conan/stable boost/ALIAS@conan/stable
In case you're accidentally calling the wrong order you're overwriting the package you initially wanted to reference. If this happens you render your original package useless and need to remove it. Then you can start all over again.
It would be perfect to have a built-in check that tells the user that the existing package boost/1.69.0@conan/stable already exists and will be overwritten by an alias package - and if the user is really sure this is what he wants to do.
Happens to me with Conan 1.11.0.
The text was updated successfully, but these errors were encountered:
I just found that a similar feature has been discussed within #3805 - the issue is just named in a way that it's hard to see on first glance what's going on there.
Agree, --check is not the most intuitive. This kind of issue happens to people who are using conan alias for the first few times - typically before you know about optional parameters. When a user knows about the possible parameters he probably also knows in which order to use conan alias.
I'd say it's better to have it than to miss it.
There's another option that is non-breaking and more intuitive: Add a new command like conan alias-with-check (I'm sure there's a better name for it) that'll do the same as conan alias --check. This would be non-breaking, but newer users would stumble upon it intuitively. Though this would add to the complexity of conan itself (new command, possible issues within future versions, users mixing up alias and alias-with-check...). Just wanted to throw it out there.
Another idea which might get the consensus as non-breaking: throw an error if the package already exists and it is NOT an alias already. This was the case that would be breaking, when you want to redefine an existing alias. But a check that you are not breaking an existing package can be totally OK
When creating an alias package with
conan alias
it is easy to mix up the order of parameters:conan alias boost/ALIAS@conan/stable boost/1.69.0@conan/stable
conan alias boost/1.69.0@conan/stable boost/ALIAS@conan/stable
In case you're accidentally calling the wrong order you're overwriting the package you initially wanted to reference. If this happens you render your original package useless and need to remove it. Then you can start all over again.
It would be perfect to have a built-in check that tells the user that the existing package
boost/1.69.0@conan/stable
already exists and will be overwritten by an alias package - and if the user is really sure this is what he wants to do.Happens to me with Conan 1.11.0.
The text was updated successfully, but these errors were encountered: