Open kernelwhisperer opened 5 years ago
Now if I do
aragon --version
it will printv5.9.3
, but if mycwd
is a project and itspackage.json
says:"aragon" : { "cliVersion": "v5.6.0", "guiVersion": "*" }
Doing
aragon --version
should actually printv5.6.0
.
On second thought, this might be too much magic and could cause problems. It would be better if the CLI would throw an error instead.
So if package.json
says:
"engines": {
"aragonCLI": "> 5.0.0"
}
And you are using v6.0.0
, it should error saying: "This project is only compatible with v5
of the aragonCLI
, please use avm set-default @aragon/cli v5.9.3
to switch"
This would also allow us to start using the CLI globally and remove it from repos before we have the "apm version manager" feature.
solc-select
has nice UX too, using an environment variable to switch between versions: https://github.com/crytic/solc-select#usage
TL;DR
nvm
, but for@aragon/cli
, as well as other tools.This will make pinning to a certain version as quick as few seconds and as easy as one command.
🚀 Feature
There is the use case where an app might be using a different version of the GUI client.
(currently this is hard coded in the CLI, but I think we need to move it to a configuration file, along with the gasPrice option and the others)
And there is also the use case where an app only works with a specific version of the CLI.
(currently people can install the CLI as a project depedency and pin it to a certain version)
Proposal
I wonder if it makes sense to centralize these versions under
~/.aragon
, for example:And declare in the
arapp.json
/package.json
or some other project-specific configuration file, which version it should use, e.g.:>= 5, <= 6
.This logic might also improve how the
aragon-desktop
handles GUI upgrades and downgrades. :thinking:The other solution
The alternative would be include these projects (
gui
,cli
, etc.) as project dependencies... :thinking:Pros:
docker
though)Cons:
I think the first solution makes more sense because these projects are not libraries like
aragon.js
oraragon-ui
. They have more in common with tools likegit
,node
,npm
, which you have installed globally and you expect them to just work.Possible interface
Now if I do
aragon --version
it will printv5.9.3
, but if mycwd
is a project and itspackage.json
says:Doing
aragon --version
should actually printv5.6.0
.