Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: more warning when missing compiler plugins [APE-1491] #1717

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Nov 1, 2023

What I did

fixes: #1222

I ran into this as well and got kinda confused for a minute!

This PR does the following to address the problem:

  1. If after compiling, a manifest is empty, the user gets another warning
  2. If trying to access a missing contract from a manifest, the IndexError is adjusted to also suggest you may be missing compiler plugins.

The full output looks like this now:

(ape310-pydanticv1) ➜  ape-safe git:(feat/safe-api) ✗ ape console                          
WARNING: Unprocessed plugin config(s): solidity. Plugins may not be installed yet or keys may be mis-spelled.

In [1]: project.dependencies["safe-contracts"]["1.3.0"]["GnosisSafe"]
WARNING: Compiled manifest produced no contract types! Are you missing compiler plugins?
ERROR: (ApeIndexError) Unable to find 'GnosisSafe' in 'safe-contracts'. Do you have the necessary compiler plugins installed?

In [2]: exit

You can see I was warned 3 times about stuff possible from missing compiler plugins.
Once at first because of an unprocessed config key. Another from compiling the dependency. And the final one, the IndexError, which I think is important, also asks me if I am missing a compiler plugin. It is important to be in the final error I believe because users always look there first.

How I did it

How to verify it

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@vany365 vany365 changed the title fix: more warning when missing comp fix: more warning when missing comp [APE-1491] Nov 1, 2023
@antazoey antazoey changed the title fix: more warning when missing comp [APE-1491] fix: more warning when missing compiler plugins [APE-1491] Nov 1, 2023
@antazoey antazoey enabled auto-merge (squash) November 1, 2023 17:55
@antazoey antazoey merged commit cab828b into ApeWorX:main Nov 1, 2023
14 checks passed
@antazoey antazoey deleted the fix/warn-empty-dependency branch November 3, 2023 14:36
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.

Using a dependnecy with no compiler plugins produces empty manifest with no warning
2 participants