Skip to content

fix(Toolbox): don't treat feed section templates as scripts#34

Merged
line0 merged 1 commit into
mainfrom
fix-toolbox-script-install
Jul 24, 2026
Merged

fix(Toolbox): don't treat feed section templates as scripts#34
line0 merged 1 commit into
mainfrom
fix-toolbox-script-install

Conversation

@line0

@line0 line0 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The Install Script macro dies while scanning feeds:

bad argument #1 to 'pairs' (table expected, got nil)

Install discovery iterated a feed section's keys directly, so the format's section-scoped template keys (fileBaseUrls, localFileBasePaths) were handed to getScript, which builds a record from any table it gets. Reading that record's channels then raised. It affects any feed that sets URL templates per section — DependencyControl's own among them, so the macro is broken for everyone on 0.8.0.

Discovery now walks the feed's packages, which already skips the non-package keys, and getChannels returns an empty list for a package that declares none, so a single malformed entry can't take down a whole scan.

Regression tests for both. walkPackages had none of its own despite being the canonical package filter.

🤖 Generated with Claude Code

Install discovery iterated a feed section's keys directly, so the format's
section-scoped template keys (fileBaseUrls, localFileBasePaths) were built into
records whose channel read then raised. Walk the feed's packages instead, which
already skips them. getChannels returns an empty list for a package without
channels, so one malformed entry can't take down a whole feed scan.
@github-actions

Copy link
Copy Markdown
Contributor

Test results — macos-latest ✅1062 · ubuntu-latest ✅1062 · windows-latest ✅1059

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
3186 3183 0 3 0 0 1m 44s

🎉 No failed tests in this run.

Github Test Reporter by CTRF 💚

@line0
line0 merged commit 49ed2ba into main Jul 24, 2026
4 checks passed
@line0
line0 deleted the fix-toolbox-script-install branch July 24, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant