crytic / solc-select

Manage and switch between Solidity compiler versions
GNU Affero General Public License v3.0
758 stars 103 forks source link

Validate minimum and maximum versions #57

Closed 0xicingdeath closed 3 years ago

0xicingdeath commented 3 years ago

Linux

vagrant@ubuntu2004:~/solc-select/foo/solc-select$ solc-select install 0.3.1
usage: solc-select install [-h] [INSTALL_VERSIONS [INSTALL_VERSIONS ...]]
solc-select install: error: argument INSTALL_VERSIONS: Invalid version - only solc versions above '0.4.0' are available
vagrant@ubuntu2004:~/solc-select/foo/solc-select$ solc-select install 0.9.4
usage: solc-select install [-h] [INSTALL_VERSIONS [INSTALL_VERSIONS ...]]
solc-select install: error: argument INSTALL_VERSIONS: Invalid version '0.8.4' is the latest available version
vagrant@ubuntu2004:~/solc-select/foo/solc-select$ solc-select use 0.9.4
usage: solc-select use [-h] USE_VERSION
solc-select use: error: argument USE_VERSION: Invalid version '0.8.4' is the latest available version
vagrant@ubuntu2004:~/solc-select/foo/solc-select$ solc-select use 0.3.1
usage: solc-select use [-h] USE_VERSION
solc-select use: error: argument USE_VERSION: Invalid version - only solc versions above '0.4.0' are available
vagrant@ubuntu2004:~/solc-select/foo/solc-select$

Mac OS X

$ solc-select install 0.3.2
usage: solc-select install [-h] [INSTALL_VERSIONS [INSTALL_VERSIONS ...]]
solc-select install: error: argument INSTALL_VERSIONS: Invalid version - only solc versions above '0.3.6' are available
$ solc-select install 0.
9.1
usage: solc-select install [-h] [INSTALL_VERSIONS [INSTALL_VERSIONS ...]]
solc-select install: error: argument INSTALL_VERSIONS: Invalid version '0.8.4' is the latest available version
$ solc-select use 0.3.2
usage: solc-select use [-h] USE_VERSION
solc-select use: error: argument USE_VERSION: Invalid version - only solc versions above '0.3.6' are available
$ solc-select use 0.9.1
usage: solc-select use [-h] USE_VERSION
solc-select use: error: argument USE_VERSION: Invalid version '0.8.4' is the latest available version

Closes #46

0xicingdeath commented 3 years ago

f7111da adds a version check for Windows for #54, which ensures that the version a user wants to interact with >=0.4.5 because:

These will be fixed in #64.

0xicingdeath commented 3 years ago

Merged into #54 for testing purposes