Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Lua mode, missing fields in package compared to PUC Lua #66

Open
alysbrooks opened this issue Nov 10, 2023 · 1 comment
Open

In Lua mode, missing fields in package compared to PUC Lua #66

alysbrooks opened this issue Nov 10, 2023 · 1 comment

Comments

@alysbrooks
Copy link

WattleScript's Lua mode is missing some fields in package that "standard" Lua (PUC Lua) has. In particular, the lack of package.preload, package.path, and package.searchers prevents Fennel from working.

I'm not sure whether this is partly a case of missing functionality or if the functionality is essentially all there and just needs to be exposed via package. I'm hoping it is all there because I don't see anything on the list of differences that would suggest this is a piece of functionality that's missing. I would like to submit a PR to address this, but am not sure I could add substantial functionality to the Lua mode's package functionality.

You can also read the original issue filed against MoonSharp.

@CallumDev
Copy link
Contributor

CallumDev commented Nov 12, 2023

This is something covered in an old PDF: https://www.moonsharp.org/MoonSharpStdLib.pdf .

Essentially, the package library is replaced by providing .NET-side script loader implementations in both MoonSharp and WattleScript. However, it may be worth investigating if the standard script loader provided by WattleScript can make use of some of these package fields in an emulation mode.

Happy to review a PR on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants