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

Fix benchmark runner bug introduced in release 0.652 #1530

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

vrn-sn
Copy link
Contributor

@vrn-sn vrn-sn commented Nov 16, 2024

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, which rely on direct file execution.

Solution

Update runFile to replace the = prefix in generated chunknames with @.

@vrn-sn vrn-sn requested a review from zeux November 16, 2024 18:13
Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vegorov-rbx vegorov-rbx merged commit c2e4ee0 into master Nov 18, 2024
8 checks passed
@vegorov-rbx vegorov-rbx deleted the fix-unsupported-require-context-benchmarks branch November 18, 2024 12:20
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.

3 participants