From 4de80d39f0cb6065658f4bec4859d0c18a45846e Mon Sep 17 00:00:00 2001 From: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:08:09 -0700 Subject: [PATCH] Remove references to ../ --- docs/amended-alias-resolution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/amended-alias-resolution.md b/docs/amended-alias-resolution.md index 4d8452b..837a2f0 100644 --- a/docs/amended-alias-resolution.md +++ b/docs/amended-alias-resolution.md @@ -105,14 +105,14 @@ These approaches were deemed undesirable during discussion and are no longer bei ### (2) Strongly recommend explicit prefixes -We don't make the `@`, `./`, or `../` prefixes necessary like in approach (1c), but we strongly recommend them. +We don't make the `@` or `./` prefixes necessary like in approach (1c), but we strongly recommend them. This can be accomplished by allowing unprefixed paths but throwing an error if they resolve to multiple files. There is a performance cost to this: currently, if we successfully match a given path to a file, we stop searching for other matches. If this approach were implemented, we would need to search for at most two matching files in case we need to throw an error. In the case of multiple nested directories with their own `.luaurc` files and `paths` arrays, this search could take linear time with respect to the total number of paths defined, in the worst case. -Of course, developers could use the `@`, `./`, or `../` prefixes to explicitly specify a search type and eliminate this performance cost. +Of course, developers could use the `@` or `./` prefixes to explicitly specify a search type and eliminate this performance cost. ```luau -- Error: ./libs/dependency.luau exists and .luaurc defines a distinct "libs" alias -- Would require ./libs/dependency.luau if "libs" alias did not exist