Repository navigation
fix(ModuleLoader): an unparseable unmanaged module version failing the load - #45
Open
CoffeeFlux wants to merge 2 commits into
Open
CoffeeFlux wants to merge 2 commits into
CoffeeFlux wants to merge 2 commits into
Conversation
…e load A required module that returns a plain version value instead of a DepCtrl record is wrapped in an unmanaged record before its version is checked. When that value doesn't parse, the record constructor asserts, so the requiring script fails with "Bad DependencyControl record" and the module is never offered to the updater. Nothing short of deleting the file recovers from it. This shows up with Aegisub-Motion's a-mo.Log, whose v1.1.0 release zip shipped with an untemplated "##__LOG_VERSION__##" version. a-mo.Log has been 1.0.0 since 2015, so no version bump ever replaces a broken copy. Treat a version that doesn't parse as 0.0.0. It fails any real requirement, so the module goes through the regular outdated-module update path. If that update fails, the outdated message now shows the installed value verbatim instead of "vnil". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Test results — macos-latest ✅1116 · ubuntu-latest ✅1116 · windows-latest ✅1113Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
…on updater stub Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
I shipped a bad update, and it seems like the recovery path from that is harsher than I thought right now. This should make it possible for maintainers to bump a version and fix these sorts of issues, but needs to end up in a DepCtrl release. Sorry about the hassle. |
CoffeeFlux
force-pushed
the
fix/unparseable-unmanaged-version
branch
from
October 7, 2026 18:06
52e7919 to
a078080
Compare
This branch has not been deployed
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.
Problem
When a required module returns a plain
versionvalue instead of a DepCtrl record,ModuleLoader.loadModuleswraps that value in an unmanagedPackageRecordbefore it checks the version. If the value doesn't parse, thePackageRecordconstructor asserts. The requiring script then fails with:The module never reaches the updater, so updating DepCtrl or the requiring script doesn't help. The only fix is deleting the file by hand.
This is what's behind TypesettingTools/Aegisub-Motion#94. The a-mo v1.1.0 release zip shipped untemplated, and
a-mo.Log(a plain table with a stringversion) has been 1.0.0 since 2015, so a broken copy is never replaced. The zip has since been rebuilt, but existing installs stay broken. v0.6.3-alpha had the same assert, so this isn't a regression.Change
loadModules, an unmanaged version that doesn't parse is treated as 0.0.0. It fails any real requirement, so the module goes through the existing outdated-module update path (updater\require).formatVersionErrorTemplate, if that update fails (offline, no feed), the "Installed" value is shown verbatim instead ofvnil.Trade-offs
0.0.0(or a packed0) is still satisfied by a module whose version doesn't parse, so such a module loads silently. It can't be worse than "any version"."1.2","v1.0.0") that used to hard-fail will now be replaced from the requiring script's feed if one provides it. That's the same thing that already happens to an unmanaged module whose version is merely lower.DependencyControl{}call while it's beingrequired, and still surfaces as a module load error.Testing
moonc -ppasses on both changed files. I couldn't run the suite locally (missing Lua 5.1 rocks), so I'm relying on CI for that.🤖 Generated with Claude Code