1
0
Fork 0
mirror of https://github.com/luau-lang/luau.git synced 2025-04-14 08:54:56 +01:00
luau/CLI
Varun Saini c2e4ee0203
Fix benchmark runner bug introduced in release 0.652 ()
### Problem

In release 0.652, `RequireResolver` was refactored to add support for
`luau-analyze`.

As part of this update, `RuntimeRequireContext` introduced a new
convention where a file's chunkname must be prefixed with `@` (e.g.,
`@./some/path.luau`). This change applies to all chunknames generated
within `RuntimeRequireContext`. However, when a `.luau` file is executed
directly from the command line (e.g., `luau ./my/script.luau`), the
chunkname is still generated with the old `=` prefix (e.g.,
`=./some/path.luau`).

Since `RuntimeRequireContext` no longer recognizes chunknames prefixed
with `=`, any attempt to directly execute a `.luau` file from the
command line fails. For example, running `luau ./my/script.luau` results
in an error stating that the context is unsupported. [This issue also
affects tools like the benchmark
runner](https://github.com/luau-lang/luau/pull/1525#issuecomment-2480454018),
which rely on direct file execution.

### Solution

Update `runFile` to replace the `=` prefix in generated chunknames with
`@`.
2024-11-18 04:20:05 -08:00
..
Analyze.cpp Sync to upstream/release/652 () 2024-11-15 14:29:30 -08:00
Ast.cpp Sync to upstream/release/575 () 2023-05-05 14:52:49 -07:00
Bytecode.cpp Sync to upstream/release/637 () 2024-08-02 07:30:04 -07:00
Compile.cpp Sync to upstream/release/637 () 2024-08-02 07:30:04 -07:00
Coverage.cpp Sync to upstream/release/513 () 2022-02-04 08:45:57 -08:00
Coverage.h Sync to upstream/release/507-pre () 2021-12-10 14:05:05 -08:00
FileUtils.cpp Sync to upstream/release/652 () 2024-11-15 14:29:30 -08:00
FileUtils.h Sync to upstream/release/651 () 2024-11-08 13:41:45 -08:00
Flags.cpp Sync to upstream/release/652 () 2024-11-15 14:29:30 -08:00
Flags.h Sync to upstream/release/537 () 2022-07-21 14:16:54 -07:00
Profiler.cpp Sync to upstream/release/637 () 2024-08-02 07:30:04 -07:00
Profiler.h Sync to upstream/release/507-pre () 2021-12-10 14:05:05 -08:00
Reduce.cpp Sync to upstream/release/637 () 2024-08-02 07:30:04 -07:00
Repl.cpp Fix benchmark runner bug introduced in release 0.652 () 2024-11-18 04:20:05 -08:00
Repl.h Sync to upstream/release/514 () 2022-02-11 11:02:09 -08:00
ReplEntry.cpp Sync to upstream/release/538 () 2022-07-28 21:24:07 -07:00
Require.cpp Sync to upstream/release/652 () 2024-11-15 14:29:30 -08:00
Require.h Sync to upstream/release/652 () 2024-11-15 14:29:30 -08:00
Web.cpp Sync to upstream/release/509 () 2022-01-06 17:46:53 -08:00