Skip to content

Add a DependencyControl record and feed#2

Open
line0 wants to merge 1 commit into
masterfrom
depctrl-record-and-feed
Open

Add a DependencyControl record and feed#2
line0 wants to merge 1 commit into
masterfrom
depctrl-record-and-feed

Conversation

@line0

@line0 line0 commented Jul 24, 2026

Copy link
Copy Markdown

Yutils is currently distributed by bundling src/Yutils.lua into the Aegisub installer (fragment_automation.iss) and the portable build, because no DependencyControl feed offered it — ASSFoundation declares it as {"moduleName": "Yutils", "optional": true} with no feed to fetch it from. This adds that feed, so Yutils can be installed and updated like any other managed module and the bundling can eventually be dropped.

What's here

  • DependencyControl.json — a feed declaring the module as tstools.Yutils (the tstools prefix marking this community-maintained fork), starting at v1.0.0.
  • A __depCtrlInit hook at the end of src/Yutils.lua that builds the DependencyControl record.

Compatibility

The record declares the bare name Yutils in provides, so scripts that require "Yutils" keep working — DependencyControl resolves the bare name to this module. The file installs to automation/include/tstools/Yutils.lua rather than the bundled automation/include/Yutils.lua. Bare-name resolution needs DependencyControl v0.7.0+, where provides was added.

Loading Yutils without DependencyControl is unchanged. The hook is only ever called by DependencyControl's module loader, so requiring the library on its own returns the same table it always did — verified locally: it loads, every namespace is intact, and Yutils.version stays nil with the hook sitting unused.

⚠️ Needs a tag on merge

The feed pins the download to a git tag:

https://raw.githubusercontent.com/TypesettingTools/Yutils/v1.0.0/src/Yutils.lua

Please push a v1.0.0 tag at the merge commit — until that tag exists the feed can't resolve. The sha1 recorded in the feed (3439D32F109F40EF24EFECE6C2A3C0AB0B314EE0) is the LF-normalized blob of src/Yutils.lua as committed here, so it will match what raw.githubusercontent.com serves from that tag.

🤖 Generated with Claude Code

Yutils has been distributed by bundling it with the Aegisub installer,
because no DependencyControl feed offered it. This adds one, so it can be
installed and updated like any other managed module.

The library registers as `tstools.Yutils` and declares the bare `Yutils`
name in `provides`, so scripts that require "Yutils" (ASSFoundation among
them) keep working unchanged.

The record is built in a `__depCtrlInit` hook, which DependencyControl calls
only when it loads the library. Loading Yutils standalone never calls it, so
the library behaves exactly as before.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@line0

line0 commented Jul 24, 2026

Copy link
Copy Markdown
Author

Companion PR on the DependencyControl side: TypesettingTools/DependencyControl#33 advertises this feed in knownFeeds, which makes it officially trusted so ASSFoundation's existing bare, feed-less Yutils requirement resolves to tstools.Yutils through provides — no ASSFoundation change needed.

Merge order: this PR first, including the v1.0.0 tag, before that one is published.

@line0
line0 requested a review from CoffeeFlux July 24, 2026 12:24
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