Skip to content

Dofile inference#3432

Open
NathanSnail wants to merge 11 commits into
LuaLS:masterfrom
NathanSnail:dofile_inference
Open

Dofile inference#3432
NathanSnail wants to merge 11 commits into
LuaLS:masterfrom
NathanSnail:dofile_inference

Conversation

@NathanSnail

Copy link
Copy Markdown
Contributor

This adds type inference for dofile similar to how require works. Also adds a new setting Lua.workspace.dofileRoots to control what dofile considers a root. The doc generator seemingly hasn't been run in a long time which is why the doc changes are so big, potentially merge from chore: changelog if you don't want the docs changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for type inference of dofile and adds a new Lua.workspace.dofileRoots setting to configure its search paths, along with updating documentation and localization files. Feedback on the changes highlights several robustness improvements: restoring a defensive type check in findUrisByFilePath to prevent crashes, resolving relative root paths to absolute paths before encoding in findUrisByDofile, removing an unused import of workspace.loading in compiler.lua, and adding a nil-guard for returns[index] before compiling it to avoid runtime errors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread script/workspace/workspace.lua
Comment thread script/workspace/workspace.lua
Comment thread script/vm/compiler.lua Outdated
Comment thread script/vm/compiler.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant