crytic / solc-select

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

solc-select doesn't recognize already install solc version #60

Open Aniket-Engg opened 3 years ago

Aniket-Engg commented 3 years ago

solc was installed on my system. Before installing the solc-select, it showed:

$ solc --version
solc, the solidity compiler commandline interface
Version: 0.8.6+commit.11564f7e.Darwin.appleclang

Once I installed solc-select, it didn't recognize my local version:

$ solc --version
No solc version set. Run `solc-select use VERSION` or set SOLC_VERSION environment variable.

While trying to use the local version:

$ solc-select use 0.8.6
You need to install '0.8.6' prior to using it. Use `solc-select install 0.8.6`

So I have to again install and use a solc version using solc-select

0xicingdeath commented 2 years ago

Hey @Aniket-Engg! This is by design as part of downloading native binaries for the system. solc-select downloads solc binaries specific to your system, and then overrides solc on your path.

Reference: https://github.com/crytic/solc-select#solc-version-not-changing-after-running-solc-select-use-version-or-setting-solc_version

Aniket-Engg commented 2 years ago

@NatalieChin80 Can you confirm that solc-select also installs solc on your system with pip3 install solc-select ?

0xicingdeath commented 2 years ago

Hey @Aniket-Engg! When you run pip3 install solc-select you're only installing the solc-select wrapper. Once you run solc-select install [VERSION], then solc-select will retrieve & download binaries for your platform hosted by the Solidity team. This is why solc-select does not work on systems which solc is already installed on a system through another method.

Aniket-Engg commented 2 years ago

Thanks for the info @NatalieChin80 . One last thing: If I run pip3 install solc-select and then solc-select install [VERSION] on a system having none of solc installation, will it go fine?

0xicingdeath commented 2 years ago

@Aniket-Engg Yes. This should work.