Remove paths

This commit is contained in:
Varun Saini 2024-09-18 10:47:53 -07:00
parent fdcfaa5788
commit 4dc8611ec6
2 changed files with 7 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# Amended Alias Syntax and Resolution Semantics # Amended Require Syntax and Resolution Semantics
## Summary ## Summary
@ -23,7 +23,7 @@ There have been disagreements about which approach is more appropriate, so this
## Possible Designs and Drawbacks ## Possible Designs and Drawbacks
Below, we have multiple different options for syntax and resolution semantics. Below, we have multiple different options for alias syntax and resolution semantics.
For each design, assume that the following `.luaurc` file is defined: For each design, assume that the following `.luaurc` file is defined:
```json ```json
{ {
@ -36,6 +36,9 @@ Additionally, assume that we have a file named `dependency.luau` located in thes
1. `./libs/dependency.luau` 1. `./libs/dependency.luau`
2. `/My/Libraries/Directory/dependency.luau` 2. `/My/Libraries/Directory/dependency.luau`
As part of the push to make require statements more explicit, we also propose removing `paths`, as aliases serve a similar purpose and are more explicit.
The following options operate under the assumption that `paths` is no longer supported in `.luaurc` files, so we do not need to provide a syntax that corresponds to `paths`.
### (1) Make explicit prefixes necessary ### (1) Make explicit prefixes necessary
#### (1a) Make aliases explicit with `@` prefix #### (1a) Make aliases explicit with `@` prefix

View file

@ -12,6 +12,8 @@ Luau itself currently supports a basic require-by-string syntax that allows for
## Design ## Design
Parts of this design are now obsoleted by [this RFC](https://github.com/luau-lang/rfcs/pull/56).
#### Aliases #### Aliases
Aliases can be used to bind an absolute or relative path to a convenient, case-insensitive name that can be required directly. Aliases can be used to bind an absolute or relative path to a convenient, case-insensitive name that can be required directly.