Open PatrickAlphaC opened 1 month ago
Make shorthands for imports, similar to solidity remappings
If I have a contract in a folder many directories away, it would be nice to be able to reference it easier.
If you have an import as such:
from my.path.to.my.other.package.here.some.other.dir.package_name import hello
it would be nice to be able to represent it as:
from @package_name import hello
When you compile, you could add a remapping to have these be identical, like:
vyper --remapping "@package_name=my.path.to.my.other.package.here.some.other.dir.package_name"
This is a new feature, so it should not have issues here.
None
Copyright and related rights waived via CC0
I think search paths does what you want right?
Simple Summary
Make shorthands for imports, similar to solidity remappings
Motivation
If I have a contract in a folder many directories away, it would be nice to be able to reference it easier.
Specification
If you have an import as such:
it would be nice to be able to represent it as:
When you compile, you could add a remapping to have these be identical, like:
Backwards Compatibility
This is a new feature, so it should not have issues here.
Dependencies
None
References
None
Copyright
Copyright and related rights waived via CC0