Closed tp86 closed 1 year ago
So it seems that compile does not infer correct Lua target (5.4 in my case) - you need to provide it explicitly with --target flag.
This is by design, I figured that erde compile
should default Lua target to 5.1+ and erde run
/ REPL to the current Lua version, as I thought those would be the most common use cases respectively. However, I'm also completely okay with changing this behavior to be a little more intuitive or adding some more documentation on this :eyes:
Also,
run
ignores--target
flag completely (not sure if it's by design or it should be passed as well...).
Definitely a bug, it looks like lib.load()
is overriding any specified targets in the cli (which also affects the REPL). This should be fixed with https://github.com/erde-lang/erde/commit/a2e8aa5b4127dbe5f69f6418dabaffbdfac6153b
This is by design, I figured that erde compile should default Lua target to 5.1+ and erde run / REPL to the current Lua version, as I thought those would be the most common use cases respectively.
I see, seems reasonable to compile with maximum compatibility by default.
Definitely a bug, it looks like lib.load() is overriding any specified targets in the cli (which also affects the REPL).
Speaking of REPL, I have prepare PR #12 with some improvements in displaying results (should be now consistent with Lua REPL).
This should be fixed with https://github.com/erde-lang/erde/commit/a2e8aa5b4127dbe5f69f6418dabaffbdfac6153b
I think this issue can be closed then.
Reproduce steps:
So it seems that
compile
does not infer correct Lua target (5.4 in my case) - you need to provide it explicitly with--target
flag.Also,
run
ignores--target
flag completely (not sure if it's by design or it should be passed as well...).I can try to take care of it if you want but I cannot predict when I have some time, so it may be delayed.