You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In incremental compilation mode, some, but not all metas are compiled. This inconsistency leads to problems for codegen backends which require a definition for all used symbols. I noticed this while working on the LLVM backend, but the root cause seems to be present for all backends (in dynamic languages like Scheme it just doesn't do any real damage).
Steps to Reproduce
Idris 2, version 0.7.0-57f455d13
Compiling the file CompiledMeta.idr (a minimized version of base/Control/Function.idr) via:
idris2 --inc chez --check CompiledMeta.idr
And look at the resulting Chez Scheme ".ss" file.
Expected Behavior
I'm not really sure, what the correct behaviour should be. But I think it should be guaranteed, that the resulting file is internally consistent and all referenced identifiers from the current module are defined. So either all metas should be included in the incremental compile data, or none.
Another way to solve this would be to compile all references to metas as (runtime) errors, like this. But that seems like just treating the symptoms instead of the root cause. Also I'm not sure if that could lead to other problems.
Observed Behavior
In the resulting file CompiledMeta.ss, the identifier CompiledMeta-f2-1244 is referenced 2 times, but never defined. This is fine for Scheme as long as CompiledMeta-x1-1255 is never called, but leads to problems in other backends, where all referenced symbols must be resolvable.
In incremental compilation mode, some, but not all metas are compiled. This inconsistency leads to problems for codegen backends which require a definition for all used symbols. I noticed this while working on the LLVM backend, but the root cause seems to be present for all backends (in dynamic languages like Scheme it just doesn't do any real damage).
Steps to Reproduce
Idris 2, version 0.7.0-57f455d13
Compiling the file CompiledMeta.idr (a minimized version of
base/Control/Function.idr
) via:And look at the resulting Chez Scheme ".ss" file.
Expected Behavior
I'm not really sure, what the correct behaviour should be. But I think it should be guaranteed, that the resulting file is internally consistent and all referenced identifiers from the current module are defined. So either all metas should be included in the incremental compile data, or none.
Another way to solve this would be to compile all references to metas as (runtime) errors, like this. But that seems like just treating the symptoms instead of the root cause. Also I'm not sure if that could lead to other problems.
Observed Behavior
In the resulting file CompiledMeta.ss, the identifier
CompiledMeta-f2-1244
is referenced 2 times, but never defined. This is fine for Scheme as long asCompiledMeta-x1-1255
is never called, but leads to problems in other backends, where all referenced symbols must be resolvable.The text was updated successfully, but these errors were encountered: