Fix/namespaces for custom packages - #178
Merged
Merged
Conversation
…st rather than the shared Typst package cache
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.
A namespace configured with
releases = ...cached its packages in the shared Typst package cache,~/.cache/typst/packages/<ns>/<name>/<version>, with nothing in that path derived from the host they came from: two projects on one machine backing the same namespace name with different hosts landed in one directory, whichever downloaded first winning, and a copy dropped there by hand shadowed the configured host without a word. A configured releases namespace now caches underrheo/releases/<slug of its source>— the same source-keyed shape therepomode has always used for its checkouts — so two hosts get two directories and nothing in the Typst cache can stand in for what a project declares. The built-in@rheobackend keeps the shared cache: its host is a single fixed constant, so there is no isolation to win, and moving it would cost every existing user a re-download and break resolving it from a symlinked checkout; a developer wanting that kind of override for their own namespace should reach forpath = ...instead. The one-time cost is that each configured namespace re-downloads its packages once.