feat(vm): integrate new Parser / Compiler / VM#112
Open
davydog187 wants to merge 4 commits intomainfrom
Open
Conversation
This PR integrates the new system into the user-facing library. Since we dont have full feature-parity yet, some of the tests are skipped.
davydog187
commented
Feb 8, 2026
| Sets the path patterns that Luerl will look in when requiring Lua scripts. For example, | ||
| if you store Lua files in your application's priv directory: | ||
|
|
||
| iex> lua = Lua.new(exclude: [[:package], [:require]]) |
Contributor
Author
There was a problem hiding this comment.
bring back and comment out
davydog187
commented
Feb 8, 2026
|
|
||
| #{Enum.join(errors, "\n")} | ||
|
|
||
| #{Util.format_stacktrace(stacktrace, state)} |
Contributor
Author
There was a problem hiding this comment.
leave a note about stacktraces here
davydog187
commented
Feb 8, 2026
Comment on lines
130
to
132
| > In order to use `Lua.set_lua_paths/2`, the following functions cannot be sandboxed: | ||
| > * `[:package]` | ||
| > * `[:require]` |
Contributor
Author
There was a problem hiding this comment.
Bring back these comments
davydog187
commented
Feb 8, 2026
Comment on lines
136
to
142
| def set_lua_paths(%__MODULE__{} = lua, paths) when is_list(paths) do | ||
| set_lua_paths(lua, Enum.join(paths, ";")) | ||
| end | ||
|
|
||
| def set_lua_paths(%__MODULE__{} = lua, paths) when is_binary(paths) do | ||
| set!(lua, ["package", "path"], paths) | ||
| def set_lua_paths(%__MODULE__{} = _lua, _paths) do | ||
| raise Lua.RuntimeException, "set_lua_paths is not yet supported in the new VM" | ||
| end |
davydog187
commented
Feb 8, 2026
Comment on lines
+554
to
+555
| iex> {[ref], lua} = Lua.eval!(Lua.new(), "return function(x) return x end", decode: false) | ||
| iex> {:ok, [ret], _lua} = Lua.call_function(lua, ref, [42]) |
Contributor
Author
There was a problem hiding this comment.
change ghanges back to their previous examples. If we can't do it like this right now, comment out and leave a todo via #iex>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates the new system into the user-facing library. Since we dont have full feature-parity yet, some of the tests are skipped.