Closed BlockGeeks0x01 closed 9 months ago
ape
$ ape --version 0.6.26 $ ape plugins list Installed Plugins alchemy 0.6.5 arbitrum 0.6.6 base 0.6.3 bsc 0.6.3 ens 0.6.2 etherscan 0.6.10 fantom 0.6.3 foundry 0.6.19 hardhat 0.6.13 infura 0.6.5 optimism 0.6.6 polygon 0.6.7 polygon-zkevm 0.6.1 solidity 0.6.11 template 0.6.1 tokens 0.6.4 vyper 0.6.13 Third-party Plugins core 0.1.dev18+g881d90e.d20231205
Please include information like:
pytest
E KeyError: Version('0.8.23+commit.f704f362')
compiler_plugin = self.compiler_manager.registered_compilers[self._ext] all_settings = compiler_plugin.get_compiler_settings( [self._source_path], base_path=self._base_path ) settings = all_settings[version]
the type of keys in all_settings is packaging.version.Version, but the type of version variable is semantic_version.Version. Even if the compiler versions are the same, the hash of the two variables are different. So there will be a KeyError in all_settings[version]. This incompatible code change comes from https://github.com/ApeWorX/ape-solidity/commit/c11e583c5eda0a3ce2874e4f480d10ab3cbb0191#diff-de61acbec749a43c9ae1590d091b2924af42588fa689b9cef657a9e02f39e016, check ape_solidity/compiler.py(line 17)
all_settings[version]
maybe should convert the type of version variable from semantic_version.Version to packaging.version.Version
semantic_version.Version
packaging.version.Version
got done
Environment information
ape
and plugin versions:What went wrong?
Please include information like:
pytest
in projectthe type of keys in all_settings is packaging.version.Version, but the type of version variable is semantic_version.Version. Even if the compiler versions are the same, the hash of the two variables are different. So there will be a KeyError in
all_settings[version]
. This incompatible code change comes from https://github.com/ApeWorX/ape-solidity/commit/c11e583c5eda0a3ce2874e4f480d10ab3cbb0191#diff-de61acbec749a43c9ae1590d091b2924af42588fa689b9cef657a9e02f39e016, check ape_solidity/compiler.py(line 17)How can it be fixed?
maybe should convert the type of version variable from
semantic_version.Version
topackaging.version.Version