Repository navigation
Resolve addon dependencies, record them in gdam.lock, hoist or nest each copy - #19
Merged
Merged
Conversation
…ach copy An addon's release may declare the exact tags of the addons it needs; the registry serves that declaration on resolve. gdam install now walks it before downloading anything and installs the whole set. One copy of an addon serves the project at addons/<dir> (hoisted). When exact pins disagree the project's own pin takes that address and a consumer that pinned a different tag gets its own copy nested at <consumer>/.gdam/<dir>, with fresh script uids so the editor never sees two files claiming one id. Each copy that declares dependencies gets a generated .gdam/deps.gd naming where its dependencies landed, which is the only way an addon reaches them. gdam.lock records what the pins resolved to with each release's verified identity and every install path. install answers from a matching lock without the registry, re-resolves when gdam.json changed, and with --frozen-lockfile refuses to. add, update and remove go through the same path, so a removed addon's own dependencies are pruned with it. "package" in an addon repository's gdam.json names the addon's source directory; install checks its declaration against the project's pins and writes its deps file there. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merged
3 tasks done
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.
Summary
internal/resolve): walks each release's declared dependencies from the registry, picks one tag per addon for the shelf (the project's pin, else the most requested, then the newest), and nests a copy under any consumer whose exact pin differs. Nested copies resolve their own dependencies the same way.internal/lockfile,gdam.lock): the pins it answers plus every release's verified identity and install paths.gdam installuses a matching lock without the registry;--frozen-lockfilerefuses to re-resolve.addons/<dir>, nested at<consumer>/.gdam/<dir>with regenerated Godot uids (internal/godotuid, base-34 encoding matchingResourceUID). A previous lock's paths that the new one drops are pruned..gdam/deps.gdper copy with dependencies:PATHSplus one preload constant per dependency script (GdSession_credential_adapter).packageingdam.jsonfor addon repositories: the source directory's own declaration must agree with the project's pins and gets its deps file.add/update/removeroute through the shared install.gdam updateis an alias ofadd.Pairs with aviorstudio/gdam-be#213 (registry stores and serves the declaration) and the gdam-actions publish change that attests it. A project with no declared dependencies behaves as before, plus a lock.
Test plan
make check(lint, build, six release archives, tests with -race)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.