Closed eliasmpw closed 1 year ago
To solve the circular dependency problem, the arguments
and flags
packages should not call each other. The solution is to move anything any object / interface common to both into a shared
folder.
I have a refactoring branch (wip) that solves this issue and a few others with the structure of the flags and args, however I had to deprioritize it for the 2.0.0
release (it will be available in 2.1.0
).
Is it possible to change this PR to fix only the instantiate
command and wait for the fixes on the other branch, or is there something breaking in the CLI at the moment?
Unfortunately both changes are needed to make the archway contracts instantiate
command work with the --code flag, currently the circular dependency makes the command fail, it parses the stdinInput
arg incorrectly
Added a unit test to cover this scenario
Some imports in
parameters
directory would return undefined because they had circular imports for thearguments
andflags
index file.Also there was an unnecessary cargo file/workspace check when the instantiate command recieves the code id directly as an argument.