fix: updater failures on cyclic dependencies, plus the exception masking them (0.8.2) - #40
Merged
Conversation
…equired module failed install
…eral CLI commands
Contributor
Test results — macos-latest ✅1073 · ubuntu-latest ✅1073 · windows-latest ✅1070Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
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.
Four fixes on top of the released 0.8.1, cut as 0.8.2.
Two of them are the update failure reported in #38, which turned out to be one bug hiding another:
ModuleLoader: an unrelated exception in place of the real error. When a required module couldn't be installed or updated, the code that turns an updater status into a readable reason calledgetUpdaterErrorMsgthrough a re-export that had been moved toUpdateTask, so the reporting path itself threw. Every such failure surfaced asattempt to call field 'getUpdaterErrorMsg' (a nil value)instead of naming the module and the cause. Affects every release since 2026-07-24.Updater: modules whose dependencies form a cycle couldn't be updated. With the exception out of the way, the real failure showed: Aegisub-Motion'sTagsandTransformrequire one another, so resolving one's requirements led back to the update already running for the other, which reportedTaskAlreadyRunningand failed the whole chain. A task now publishes the version it is installing while it resolves its requirements, and a requirement that version satisfies is met by letting that update finish. The version is published only for the duration of the resolution and cleared through apcall, so an update abandoned by a thrown error leaves nothing behind for a later run.The other two are cherry-picks of fixes already on
package-repo-onboarding:utils.deepCopyrecursed forever on a self-referencing table; cycles are now reproduced as cycles and a table reached by several keys is copied once.generate-typesandgenerate-docsreported files a feed marks deleted as unreadable sources, and a deleted file's entry could shadow the source that replaced it during test-module resolution.New tests cover the re-entrant update path end to end: that the loader accepts a requirement whose update is already under way, that a version below the requirement still fails, that both records the loader passes reach the same cached task, and that a thrown error clears the published version and the running flag.
Full suite green (4 packages, 0 failed).
🤖 Generated with Claude Code