Skip to content

Conversation

@sea-grass
Copy link
Contributor

This PR adds a @compileError statement with a helpful error message if the user tries to reference a function that is unavailable in their chosen lang.

Most of these functions previously only had a doc comment clarifying e.g. that they're only supported in Luau, so in most cases this adds additional safety. However, there was one function, raiseInterruptErrorStr, which became a no-op if the lang weren't Lua, instead of providing an error. While I took the approach of raising a compile error if the function were used but not supported, there is precedent of turning an unsupported function into a no-op. While I believe the more appropriate path would be to raise a compile error, I'm interested in hearing what the preferred outcome is for these cases.

@robbielyman robbielyman merged commit ac76219 into natecraddock:main Apr 23, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants