-
Notifications
You must be signed in to change notification settings - Fork 76
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
Alias is currently overwrote with no warning #1417
Comments
The original implementation had |
My feedback was that --force is confusing because it doesn't communicate the scope of what is being forced. An option like --force should be focused on the primary action being performed by a command which in this case is deploying the contract, and not related to an ancillary action being performed like saving an alias. Why: It's natural to see options related to their primary action. For example, if we add --force, this command looks like it forces deployment but is actually invalid:
Or this command which is valid but I think most folks would assume means deployment is forced and the force is unrelated to the alias:
If we want aliases to not overwrite by default, then I think the path that results in a clearer API is:
|
I expect that someone interacting with a pubnet network is probably keeping a record of their contract addresses concretely somewhere that isn't just in these aliases given that it is a production use case, and that these aliases are more useful during development, in which case overwriting feels fine. We overwrite elsewhere. We could output a log line, or a stderr output saying the alias is being ovewritten and what the old value was and new value, so if someone accidentally ovewrites they can fix it. |
This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 30 days unless the stale label is removed, and the assignee is removed or updated. |
Currently when reusing an alias it will overwrite the old contract id. Should we add a
--force
flag to allow this but fail otherwise?The text was updated successfully, but these errors were encountered: