Dofile inference#3432
Conversation
There was a problem hiding this comment.
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.
This adds type inference for
dofilesimilar to howrequireworks. Also adds a new settingLua.workspace.dofileRootsto control whatdofileconsiders 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 fromchore: changelogif you don't want the docs changes.