Sub-optimal include directory resolution #488
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?
Created by: hanssv
Not sure if it is a minimal reproducing example, but it should be small enough. Three files, in three different directories:
/tmp/foo.aes
:/tmp/dir1/bar.aes
:/tmp/dir2/baz.aes
:Straight up compiling
foo.aes
fails:The problem is that while resolving the includes in
bar.aes
(which is indir1
) we still do this relative to the root source file (i.e. in/tmp
) this means we won't find../dir2
.A workaround is to pass both the top level and the subdirectory as include paths:
Created by: marc0olo
thanks for creating the issue! 👍
maybe it would be good if the include path doesn't have to be referenced at all if every path is relative? 🤔
Created by: hanssv
Definitely - this contract should compile with
aesophia_cli /tmp/foo.aes
and nothing more.Created by: radrow
Module system in Sophia is inherently broken and we plan to fix it in the rewritten version. I am giving it low priority because
Created by: hanssv
Straighforward to fix for now 😅