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

feat: add support for install arguments on deploy #1087

Merged
merged 6 commits into from
Oct 2, 2020

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Oct 2, 2020

No description provided.

Co-authored-by: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com>
@hansl
Copy link
Contributor Author

hansl commented Oct 2, 2020

Note: There is no way to have the type of the init function as it is not part of the DID file, unfortunately. This means you need to properly type the arguments.

Also, to avoid confusion with canister name, I had to specify an actual argument name (--argument).

@chenyan-dfinity
Copy link
Collaborator

Note: There is no way to have the type of the init function as it is not part of the DID file

It is part of the did file, see: https://github.com/dfinity-lab/sdk/blob/802a1a4a7e85f3c27ba74f39d2d804bfcb9bbe35/src/dfx/src/commands/canister/install.rs#L132

@hansl
Copy link
Contributor Author

hansl commented Oct 2, 2020

@chenyan-dfinity mmmh I'll add candid resolution then. This will happen per canister, though, and means if one argument is "Text" and the other is "Nat", it will work with the first and fail with the second. Makes sense?

@chenyan-dfinity
Copy link
Collaborator

Yes, it's the same behavior with canister install. It only works for one canister unless the argument takes a vector of (canister, init value) pairs.

@hansl
Copy link
Contributor Author

hansl commented Oct 2, 2020

Copy link
Collaborator

@chenyan-dfinity chenyan-dfinity left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot merged commit b02f33d into master Oct 2, 2020
@mergify mergify bot deleted the hansl/fix-dfx-deploy-install-args branch October 2, 2020 23:56
@mergify mergify bot removed the automerge-squash label Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants