8000 Fix certain invalid `@lute/` runtime requires giving a nonsensical error by ffrostfall · Pull Request #280 · luau-lang/lute · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix certain invalid @lute/ runtime requires giving a nonsensical error #280

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 yo 8000 u account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025

Conversation

ffrostfall
Copy link
Contributor

This fixes three cases where we previously had bad error messages

  • Requiring @lute/
  • Requiring @lute/foo
  • Requiring @lute/..

The fix is done by introducing a "lute" alias into the global config, and then checking to see if we are using that alias in the require resolver. If we are, we luaL_error out of the require function immediately.

Future work

There are more edge cases here! This PR does not fix @lute/foo/.. having a funky error message. However, as @lute/foo is the most common mistake, I am still PRing this as it is an improvement.

@ffrostfall ffrostfall changed the title Fix a multitude of bad error messages when passing incorrect paths to @lute/ requires Fix certain invalid @lute/ runtime requires giving a nonsensical error May 15, 2025
aatxe
aatxe approved these changes May 16, 2025
909D
@aatxe aatxe merged commit cb1dc27 into luau-lang:primary May 16, 2025
6 checks passed
green-real pushed a commit to green-real/lute that referenced this pull request May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0