lune
lune copied to clipboard
Make `Runtime::run` Return Lua Values
This PR intends to return a more meaningful output for Runtime::run invocations. Instead of only returning an ExitCode, Runtime::run now returns a tuple including a Vec of values returned by the lua thread.
TODO:
- [x] Return the actual exit code instead of an enum variant
- [x] Depends on https://github.com/lune-org/mlua-luau-scheduler/pull/1 to be merged
- [x] Return lua values
- [x] Update dependents to consume tuple
Once merged, this closes #175 and closes #92.
@filiptibell In order to return consumable exit information, exit.rs in mlua-luau-scheduler needs to return an ExitStatus instead of an ExitCode.
I'll go ahead and create an issue in the repo.
I'm currently returning the raw exit code, instead of an ExitStatus since there doesn't seem to be any way to construct one out of an exit code.
See https://github.com/lune-org/mlua-luau-scheduler/pull/1/
Just a heads up - since this is a breaking change it's going to take a while before it gets merged. I've added it to the 0.9 milestone to make sure it's not forgotten for that
Would it be possible to merge this before #188?
Would it be possible to merge this before #188?
#188 is not going to have any breaking changes, and the plan is to make a patch release with that PR + changes on main, so it would be difficult to get this PR in before
Guess I will restructure once the restructuring is complete.