Skip to content

Pre-v0.7.0 Polish#28

Merged
line0 merged 33 commits into
mainfrom
improve-docs-site-rendering
Jul 24, 2026
Merged

Pre-v0.7.0 Polish#28
line0 merged 33 commits into
mainfrom
improve-docs-site-rendering

Conversation

@line0

@line0 line0 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Final polish pass before the v0.7.0 release: API-doc generation (MoonCats), documentation, and a batch of fixes surfaced while going through the open issues.

Changes

MoonCats (API-doc & type generation)

  • Mermaid diagrams, light/dark theme, and MoonScript/Lua source tabs in the generated docs
  • Sidebar labels show classes without their namespace
  • Resolve enum-member references in value position and computed enum keys that reference another enum; treat table-module enums as first-class exports and link their type cells by @class name
  • Better typing: table-literal references, setmetatable returns, empty/interpolated strings, cross-module data members, and skipping __class augmentations

Fixes

  • Logger/utils: seed the RNG per Lua state so concurrently-loaded scripts no longer collide on identical random streams, and expose Utils.seedRandom/getRandomSeed
  • Aegisub test registration: load shared test helpers via requireTest so module suites register under Aegisub, not just the CLI
  • hash: correct an improperly-prefixed private method
  • registerMacro: clear error at registration when the process callback is missing or not a function
  • Install/Uninstall/Update dialogs: dropdowns start empty on macOS instead of sticking on the first entry

Docs & refactors

  • README consistency and clearer prerequisites; prose for domain enums; assorted missing type annotations
  • Updater: move the UpdateTask re-export to root level; use literal ContextCeiling enum values

Resolves

Fixes #5
Fixes #12
Fixes #14
Fixes #16
Fixes #17
Fixes #19
Fixes #22
Fixes #23
Fixes #25
Fixes #27

🤖 Generated with Claude Code

line0 and others added 22 commits July 23, 2026 13:09
Table-field enums now type as <Name>Enum with synthesized classes and render under an
Enums section, matching class statics; unexported enum references fall back to the base
Enum type instead of any; and the Types section no longer duplicates exported enums'
aliases or a table module's own @Class.
Test leaves hardcoded the CLI-only `l0.DependencyControl.test.helpers.*`
path, so under Aegisub's DepUnit suite root the require threw during import,
silently leaving the DepCtrl suite with zero classes behind a lone "[All]"
menu. Inject the helpers from test.moon through the suite's requireTest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…computed ones

otherwise MoonCATS doesn't pick them up and they end up missing in the API reference docs
FileLock.isAvailable, NamedSemaphore.isAvailable/pid, and the ffi-windows
haveKernel32 flag are seeded in platform branches, so the type generator
could not infer them and left them as `any`. Add ---@type so they document
as boolean/integer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A lookup Enum whose keys are `OtherEnum.Member` expressions — e.g.
domain.ScriptTypeSection, keyed by ScriptType's members — previously dropped
every entry as a computed key and raised W-COMPUTED-KEY. Resolve each key
against the referenced enum's already-parsed members: the synthesized class
gains a bracketed-literal field (`---@field ["automation"] ScriptTypeSection`)
and the docs member column shows the source `Enum.Member` expression, with
values and descriptions still joined from the alias. Keys that don't resolve
to a known enum member are still reported.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generalize the computed-key resolver to an `Enum.Member` reference resolver
that runs in either position, so a member value like
`UserRequested: UpdateReason.UserRequested` resolves to the referenced
member's literal instead of being dropped as computed.

This retires the b8d31a2 workaround: UpdateTask.ContextCeiling can again
carry UpdateReason's values by reference (restoring the DRY coupling its
comment describes) while the generated docs and type stub still show the
final string values.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ations

- a field or export referencing a table-literal local now resolves to
  `table` instead of `any` (e.g. config-schema's exported `sections`)
- a `Class.__class.field =` assignment manipulates the runtime class object,
  not the documented type surface, so it no longer synthesizes a field. This
  stops `DependencyControl.__class.version = rec` from shadowing the
  inherited `version` property with `any`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Host.__resolver holds a function required from a helper module,
NamedSemaphore.__unlinkFinalizer holds a Finalizer.create result (nil on
Windows), and PackageRecord.checkOptionalModules delegates to a ModuleLoader
static. None can be inferred across modules, so annotate each directly: a
function type, userdata?, and a doc block mirroring the delegated contract.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…on't collide

previous fix wasn't effective because it relied on different process IDs and was only tested outside aegisub (with difference processes)
- registerMacro asserts its process callback is a function, failing at
  registration with a clear message instead of a deferred nil-call (#5).
- Install/Uninstall/Update dropdowns lead with an empty entry so they start
  unselected on macOS, where a dropdown otherwise sticks on its first item (#14).
- Fix the StartupSweep fixture for the testSuiteInitialized registration guard
  and cover the skip path.
- Round out the 0.7.0 changelog (seedRandom/getRandomSeed) and refresh feed hashes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Test results — macos-latest ✅1054 · ubuntu-latest ✅1054 · windows-latest ✅1051

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
3162 3159 0 3 0 0 1m 7s

🎉 No failed tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

line0 added 7 commits July 24, 2026 00:13
…ster`

DependencyControl served its own feed from `master` — the one branch the
publish-branch release model had to special-case. Because clients before
v0.7.0 can't parse the current feed format, the URL can't be reformatted in
place; it now points at `publish` like any other package, and a one-time
resolved feed left on `master` bridges pre-0.7.0 clients up to v0.7.0.
important when updating from an earlier version that didn't ship with dkjson
line0 added 2 commits July 24, 2026 03:43
A reload cleared only the module's own package.loaded key, so the fresh
chunk could bind to submodules left over from the replaced version. Purge
every package.loaded entry under the module's namespace before re-requiring.
@line0
line0 force-pushed the improve-docs-site-rendering branch from 5d6aaec to b027dde Compare July 24, 2026 01:44
@line0
line0 merged commit f349ed7 into main Jul 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment