-
Notifications
You must be signed in to change notification settings - Fork 393
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
Disabling built-in functions #1538
Comments
Similar to other options, it seems like it can be a list of libraries and not specific functions. |
I think it would be better to allow functions to be selected individually, if possible. That would allow removing colliding functions (or monkey patching) without losing fastcalls for every other function in the same module. This would be future-proof with any new functions added to the language. Would it be possible to specify the functions as |
Yes, it should be possible that way and does make sense. |
thx for the update |
Should be implemented in the sync this week. |
Thank you! |
Luau currently does not have a way to modify built-in libraries like vanilla Lua does. Even though it is possible to remove, rename or overwrite global functions and functions in module tables using the C API (before loading any scripts), the built-ins hardcoded in the compiler always exists and have priority.
This means that any new built-in introduced to Luau can effectively force embedders to rename their existing functions with the same name.
This issue came up when adopting the vector library but it is a more generic issue only somewhat related to the vector library.
One way to resolve this would be to a new field
disabledBuiltIns
toLuau::CompileOptions
.The text was updated successfully, but these errors were encountered: