Skip to content
New issue

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

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

Already on GitHub? # to your account

Display of interfaces in errors show full path #4237

Open
fubuloubu opened this issue Sep 14, 2024 · 2 comments
Open

Display of interfaces in errors show full path #4237

fubuloubu opened this issue Sep 14, 2024 · 2 comments
Assignees
Labels
bug - UX a bug related to UX
Milestone

Comments

@fubuloubu
Copy link
Member

fubuloubu commented Sep 14, 2024

Version Information

  • vyper Version (output of vyper --version): 0.4.0
  • OS: linux
  • Python Version (output of python --version): 3.11.9

What's your issue about?

When I have a compile issue with an function whose signature contains an interface, it shows the full path to the interface:

ERROR: (VyperCompileError) contracts/test/TestValidator.vy
InterfaceViolation:Contract does not implement all interface functions: validate(address,interface [...]/site-packages/vyper/builtins/interfaces/IERC20.vyi,uint256,Bytes[65535])

This is kind of noisy and too much information that muddles the display of the error

How can it be fixed?

It should display the module it came from instead:

ERROR: (VyperCompileError) contracts/test/TestValidator.vy
InterfaceViolation:Contract does not implement all interface functions: validate(address,interface ethereum.ercs.IERC20,uint256,Bytes[65535])

Additionally, it may be useful to have some sort of debug flag to call the compiler that contains the mapping of all root modules to their locations on disk (if that doesn't exist already)

@fubuloubu fubuloubu added the bug - UX a bug related to UX label Sep 14, 2024
@charles-cooper charles-cooper added this to the v0.4.1 milestone Oct 4, 2024
@charles-cooper
Copy link
Member

i'm not sure if this was already fixed in 0.4.1 or not, will check

@charles-cooper
Copy link
Member

Additionally, it may be useful to have some sort of debug flag to call the compiler that contains the mapping of all root modules to their locations on disk (if that doesn't exist already)

this already exists in annotated_ast output, or are you asking about something else?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug - UX a bug related to UX
Projects
None yet
Development

No branches or pull requests

3 participants