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

RFC: Absolute Require Syntax #80

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

bradsharp
Copy link
Contributor

This RFC proposes additional syntax for require by string that allows modules to be resolved relative to the root of a project or library. It is based on #78 which proposed the same changes but also removed relative paths.

Rendered.

@vegorov-rbx
Copy link
Contributor

This really sounds how we wanted to have libraries to work initially.
We explored both having an alias path '@' to point to the root of the library as well as just having library root '.' in paths inside luaurc to resolve non-relative requires from module root. That was before we removed absolute requires.
This really sounds like the later, but codified implicitly without a need to place '.' in each library luaurc file.
Sounds good and I don't think it even interacts with relative requires, so any problems with that can still be fixed separately if desired.

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