NomicFoundation / hardhat-vscode

Solidity and Hardhat support for Visual Studio Code
https://hardhat.org
MIT License
169 stars 38 forks source link

Support Ape 0.8 #594

Open antazoey opened 2 weeks ago

antazoey commented 2 weeks ago

Ape 0.8 has a few changes that causes problems when using this VSCode integration, mostly documented here https://github.com/ApeWorX/ape-solidity/issues/152.

I am not sure if there are additional changes to consider.

One note: Both pre-0.8 and post-0.8 style projects should be supported (ideally). This is because some older projects may not require or intend on updating Ape.

alcuadrado commented 2 weeks ago

remappings 99% of the time are no longer specified in the ape-config.yaml. This is because the auto-remapping feature covers all typical use-cases.

Is there a way to print all the remappings, including automatic ones, using ape? We could use that instead.

antazoey commented 2 weeks ago

Is there a way to print all the remappings, including automatic ones, using ape? We could use that instead.

You can like this:

In [1]: compilers.solidity.get_import_remapping()
Out[1]: 
{'@openzeppelin': 'contracts/.cache/openzeppelin/4.5.0',
 'openzeppelin': 'contracts/.cache/openzeppelin/4.5.0'}

Would that work or would a CLI command be required?