All includes handled relative to the main file #443
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As I see,
include
in included files only works relative to the main contract file. This is ok if we have all files in the same project, but if we include a contract from another repository or an npm package and that contract includes something relative to it then it won't work. I think the best is to resolve includes relative to the current file.Reproduction
Includes.aes
Library.aes
Sublibrary.aes
But if I replace
in Library.aes then it works
The compiler should search for paths relative to the file that has the
include
at first, and then relative to the path of the main contract. That's how the erlang compiler seems to handle includes.So I think that both
include "./Sublibrary.aes"
andinclude "./lib/Sublibrary.aes"
should work.What is the status of this? I have issues with includes and was going to open a new bug report. If this is a known issue we should collect all info in one place