Skip to content

fix: updater failures on cyclic dependencies, plus the exception masking them (0.8.2) - #40

Merged
line0 merged 4 commits into
mainfrom
v0.8.1-fixes
Aug 17, 2026
Merged

fix: updater failures on cyclic dependencies, plus the exception masking them (0.8.2)#40
line0 merged 4 commits into
mainfrom
v0.8.1-fixes

Conversation

@line0

@line0 line0 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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 called getUpdaterErrorMsg through a re-export that had been moved to UpdateTask, so the reporting path itself threw. Every such failure surfaced as attempt 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's Tags and Transform require one another, so resolving one's requirements led back to the update already running for the other, which reported TaskAlreadyRunning and 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 a pcall, 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.deepCopy recursed forever on a self-referencing table; cycles are now reproduced as cycles and a table reached by several keys is copied once.
  • generate-types and generate-docs reported 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

@line0 line0 added the bug label Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Test results — macos-latest ✅1073 · ubuntu-latest ✅1073 · windows-latest ✅1070

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
3219 3216 0 3 0 0 1m 24s

🎉 No failed tests in this run.

Github Test Reporter by CTRF 💚

@line0
line0 merged commit 02116b0 into main Aug 17, 2026
4 checks passed
@line0
line0 deleted the v0.8.1-fixes branch August 17, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant