Closed Gohla closed 2 years ago
Indeed pretty inconsistent. Would such illicit imports be verifyable (in Spoofax 3)?
Indeed pretty inconsistent. Would such illicit imports be verifyable (in Spoofax 3)?
Right now this is not checked. Meta-languages in Spoofax 3 could add checks for this by accepting a list of exported directories and ensuring that all imports are visible through the exported directories.
Also, statix.runtime
should probably be a new-style Stratego 2 library, such that we do not need export the sources anymore, and instead export the compiled code, which would also fix this issue.
We currently have both Stratego 1 and 2 to for backwards compatibility with languages using Statix together with Stratego 1. But it is good to hear that this is on the backlog for Spoofax 3 meta-languages, and that Stratego 2 apparently does not suffer from this problem.
statix.runtime/trans/statix/runtime/renaming.str
importssignatures/-
, but this import can fail whenstatix.runtime
is used through a source dependency, because onlysignatures/statix/**/*.str
is exported fromsrc-gen
. If the language itself then does not have any generated signatures in thesignatures
directory, the import will fail. This is observed in Spoofax 3 through https://github.com/metaborg/spoofax-pie/issues/112.I think the export is correct and
renaming.str
should not importsignatures/-
, which seems to not be needed anyway, and that is what this PR changes.