Pre-v0.7.0 Polish#28
Open
line0 wants to merge 25 commits into
Open
Conversation
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>
Contributor
Test results — macos-latest ✅1053 · ubuntu-latest ✅1053 · windows-latest ✅1050Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
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.
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)
@classnamesetmetatablereturns, empty/interpolated strings, cross-module data members, and skipping__classaugmentationsFixes
Utils.seedRandom/getRandomSeedrequireTestso module suites register under Aegisub, not just the CLIDocs & refactors
UpdateTaskre-export to root level; use literalContextCeilingenum valuesResolves
Fixes #5
Fixes #12
Fixes #14
Fixes #16
Fixes #17
Fixes #19
Fixes #22
Fixes #23
Fixes #25
Fixes #27
🤖 Generated with Claude Code