[Types] Fix Type errors for entire repository#7229
Draft
keithharvey wants to merge 10 commits intobeyond-all-reason:masterfrom
Draft
[Types] Fix Type errors for entire repository#7229keithharvey wants to merge 10 commits intobeyond-all-reason:masterfrom
keithharvey wants to merge 10 commits intobeyond-all-reason:masterfrom
Conversation
Contributor
f78dfaf to
a064e4b
Compare
This was referenced Mar 27, 2026
This was referenced Mar 28, 2026
ebcaa0a to
0e2ae48
Compare
This was referenced Mar 31, 2026
Draft
Closed
Draft
4228883 to
4ecaa74
Compare
135fa76 to
515bafc
Compare
b118457 to
6d08a33
Compare
This was referenced Apr 14, 2026
Add Utilities, I18N, Debug, Lava, and GetModOptionsCopy to the System tables in luaui/system.lua and luarules/system.lua so that widgets and gadgets can access them after detach-bar-modules moves them off the Spring table. Also add .luarc.json globals and type stubs for LSP support.
Replaces the vendored gajop/i18n fork with the upstream i18n package via lux. The mig-i18n branch applies the codemod that rewrites the wrapper and call sites to use this dependency.
Restructures the 20 files under luaui/Tests/, luaui/TestsExamples/,
plus the headless-only common/testing/infologtest.lua, from bare-
global hook declarations to a return-table shape. Updates the
dbg_test_runner widget to read test hooks from the returned table.
Motivation: the pre-existing shape required the test files to run
under setfenv(chunk, testEnvironment) and define `function test()`,
`function setup()`, etc. as bare module-level globals that setfenv
redirected into the environment. That works at runtime but emmylua
can't model the sandboxing — it sees 20+ files declaring project-
wide globals like `test`, `setup`, `skip`, `cleanup`. To keep
emmylua happy, .emmyrc.json had to blacklist both test directories
under workspace.ignoreDir — a kludge on clearly-ours code. Lives on
its own leaf so the convention change can be discussed in isolation.
Minimal shape change per file — just prepend `local` to each top-
level `function` declaration, and append a final `return { ... }`
block listing whichever lifecycle hooks (skip/setup/test/cleanup)
that file actually defines. Original indentation and formatting
preserved (no stylua reformatting noise — the fmt transform runs
after this one in the mig pipeline).
Runner patch — luaui/Widgets/dbg_test_runner.lua, loadTestFromFile:
- capture the return value of pcall(chunk)
- require it to be a table
- merge its keys into testEnvironment so runTestInternal still
reads bare `skip`/`setup`/`test`/`cleanup` under setfenv
Vendored LuaCATS annotations for busted/luassert to provide IntelliSense for the unit-test surface. Lives on its own leaf so the discussion around 'vendoring LuaCATS types' can happen in isolation — prior pushback on the same direction in an earlier unit-testing PR makes this the right place to litigate it rather than burying it in a broader env commit. Why vendored instead of declared as a Lux dep: Lux does not yet support pulling LuaCATS annotations from library deps, and quick attempts to wire this up in Lux failed. Upstream tracking issue: lumen-oss/lux#953 — once that lands, these directories should be deleted in favor of declaring busted as a normal Lux dev-dep. Sources (pinned SHAs): - types/busted/ https://github.com/LuaCATS/busted @ 5ed85d0e016a5eb5eca097aa52905eedf1b180f1 - types/luassert/ https://github.com/LuaCATS/luassert @ d3528bb679302cbfdedefabb37064515ab95f7b9 See types/busted/provenance.md and types/luassert/provenance.md for per-directory upstream refs + license status.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of BAR type-error cleanup. Combined deterministic transforms — what
masterlooks like with every leaf applied sequentially.Commits
06c789ea46env: expose detached BAR modules to widget/gadget sandboxaf84ac4e04deps: add kikito/i18n.lua as lux dependencyf327f4e968gen(hand): integration tests return-table shape973c0aee84gen(hand): inline luassert and busted LuaCATS types5e0dc1b41egen(stylua): initial formatting of entire codebase894373988agen(bar_codemod): bracket-to-dotfc0c52e504gen(bar_codemod): rename-aliasesc64f7be008gen(bar_codemod): detach-bar-modules4cd052514cgen(bar_codemod): i18n-kikito6d08a3382bgen(bar_codemod): spring-splitBranch Topology
All branches in the BAR type-error cleanup stack. Regenerated deterministically by
just bar::fmt-mig-generate. Generated 2026-04-14 18:58:02 UTC.Leaves — each targets
master, mergeable independently:masterstyluabar-lua-codemod bracket-to-dotbar-lua-codemod rename-aliasesbar-lua-codemod detach-bar-modulesbar-lua-codemod i18n-kikitobar-lua-codemod spring-splitbar-lua-codemod integration-testsbar-lua-codemod busted-typesRollups — composite branches stacking the leaves and (for
fmt-llm) the env + LLM layers:mastermig