ape: Cannot compile OpenZeppelin 5.x as a dependency

Environment information

  • OS: macOS

  • Python Version: 3.10

  • ape and plugin versions: 0.7.3

  • Contents of your ape-config.yaml (NOTE: do not post anything private like RPC urls or secrets!):

name: Terms Of Service

dependencies:
  - name: OpenZeppelin
    github: OpenZeppelin/openzeppelin-contracts
    version: 5.0.1

solidity:
  import_remapping:
    - "@openzeppelin=OpenZeppelin/5.0.1"

plugins:
  - name: solidity
    version: 0.7.0

What went wrong?

Please include information like:

OpenZeppelin 5.x does not work with ape.

ape pm compile -v debug
DEBUG: 'tmpeosen690' is not an 'ApeProject', but attempting to process as one.
WARNING: Compiled manifest produced no contract types! Are you missing compiler plugins?
SUCCESS: Package 'OpenZeppelin@5.0.1' compiled.

# No files are compiled, scanned, or created

How can it be fixed?

Downgrade to OpenZeppelin 4.x.

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

After a bunch of testing, I deduce the problem is just that it did not fail in anyway when the dependency had no sources. Like - obviously compiling an empty manifest is not going to produce contract types – so we should have failed or at least warned much before that point.

It makes sense to just fail and not even cache a dependency if it is missing sources because that is useless and will always require a re-install after fixing the config or whatever needs to be done.