Would it be possible when any colony service command is run to automatically ensure that colony network is completely deployed and set up before continuing?
Yea, I think we can make this happen.
As a related issue, it is not clear to me when the colony-setup command needs to be rerun.
colony-setup script within the
colony-cli package was added as a means to quickly deploy a test colony in order to test extension contracts created in the
colony-starter-contract package. This script could definitely be improved upon potentially as a prompt that would accept configuration options.
In other colonyJS packages, there is a
colony-setup script included in the projects
scripts directory, which is intended to be customizable so that developers collaborating on a project can run a script to deploy the colony that is required for their application or service.
This script can easily be ignored if you want to write your own script or you are creating an application or service that will support the creation of colonies within it, such as
It seems that when I run yarn, even when I have not changed the colony service version number, that it is sometimes causing the colony network setup to be disrupted/deleted and need to be repeated before I continue. I am getting some strange errors in my dapp (e.g. missing contract addresses, etc.) that seem to come from this.
This can happen when you run yarn because the
colony-cli package will be updated, which means the pulled down colonyNetwork repository that was installed in the
colony-cli package as a dependency will be updated. There might be a way around this that would involve preventing updates to this dependency but I do not know of anything of the top of my head.
One solution to this issue would be to run the
colony-cli package globally so that whenever you run
yarn in your project, the necessary steps to run colonyNetwork do not have to be repeated.