Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@arcz
Copy link
Member

@arcz arcz commented Dec 29, 2020

Currently, solc-select runs solc in Docker on macOS which turned out to be problematic for some users. This PR presents a Python-based reimplementation using native macOS binaries from https://binaries.soliditylang.org/macosx-amd64/list.json. The binaries go back to 0.3.6 for macOS and 0.4.10 for Linux. Works the same way on Linux and macOS. There are no other dependencies than Python 3.6+.

This PR is a WIP to achieve the feature parity with the current solc-select and to have a period of time to try it out on real-world scenarios. Despite being a draft, it's already usable and the core features are working.

The interface has changed and now all the artifact management is done through solc-select ... commands. The solc script is just a wrapper dispatching to the set artifact version without any additional functionalities.

$ solc-select --help
usage: solc-select [-h] {install,use,versions} ...

positional arguments:
  {install,use,versions}
                        Allows users to install and quickly switch between Solidity compiler versions
    install             list and install available solc versions
    use                 change the version of global solc compiler
    versions            prints out all installed solc versions

optional arguments:
  -h, --help            show this help message and exit

In action:

$ solc-select versions
No solc version set. Run `solc-select use VERSION` or set SOLC_VERSION environment variable.
0.3.6
$ solc-select install 0.8.0
Installing '0.8.0'...
Version '0.8.0' installed.
$ solc-select use 0.3.6
Switched global version to 0.3.6
$ solc-select versions
0.8.0
0.3.6 (current, set by /Users/artur/.solc-select/global-version)
$ solc --version
solc, the solidity compiler commandline interface
Version: 0.3.6-b96bf446*/Release-Darwin/appleclang
$ SOLC_VERSION=0.8.0 solc-select versions
0.8.0 (current, set by SOLC_VERSION)
0.3.6
$ SOLC_VERSION=0.8.0 solc --version
solc, the solidity compiler commandline interface
Version: 0.8.0+commit.c7dfd78e.Darwin.appleclang

@arcz arcz marked this pull request as ready for review January 4, 2021 18:55
@arcz arcz merged commit b09a02f into master Jan 4, 2021
@arcz arcz deleted the experimental-refactor branch January 4, 2021 18:57
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.

2 participants