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

Display of interfaces in errors show full path #4237

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

Display of interfaces in errors show full path #4237

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - UX a bug related to UX
Projects
None yet
Development

No branches or pull requests

1 participant