feat(snippets): implement the svn ice with native git - #5
Open
vladdoster wants to merge 15 commits into
Open
Conversation
The suite drives real clones through the code under test, so unset GIT_CONFIG and friends and point GIT_CONFIG_GLOBAL at the test directory — `git config' honours GIT_CONFIG as an implicit `--file' and would otherwise write to the config of whoever runs the tests. Clone with --reference on the main checkout's object store rather than the top-level directory, so the suite also runs from a linked worktree. Move the not_exists assertion out of tests/ices.zunit into the bootstrap, where zunit's assert dispatch makes it available to every test file, and add nocolor() for matching against +zi-log output. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
.zinit-two-paths probed for .svn to tell a directory snippet from a file snippet, which stops working once the backend no longer creates one. Probe ._zinit/mode (and its legacy ._zplugin spelling) instead, keeping .svn as a fallback for working copies downloaded before the switch. Deliberately not probing for .git: unlike .svn it isn't zinit-exclusive, so a single-file snippet whose atclone'' runs `git init' would be misclassified. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
GitHub retired its Subversion bridge in January 2024. Reimplement .zinit-mirror-using-svn as a blobless, depth-1 fetch whose sub-tree is committed as a root commit and checked out, reproducing the flat layout `svn checkout' gave with a clean `git status'. Add .zinit-parse-svn-url to split /trunk/, /branches/ and /tags/ URLs into a (repository, ref, sub-directory) triple. Existing .svn working copies are migrated in place on the next update; a failed first download is rolled back, while a failed migration leaves the installed snippet untouched. Implement reset''/-r with `git reset --hard', and propagate .zinit-download-snippet's error code 4 so that `zinit snippet' fails on a failed download instead of registering a snippet that isn't there. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
`zinit status' ran `svn status -vu' on directory snippets. Print the last commit and any local modifications instead, and keep answering the question `svn status -vu' answered — is this snippet stale? — with a ref-advertisement probe of the upstream sub-tree. Snippets not yet migrated from Subversion say so rather than failing obscurely. Drop Subversion from the help text and from the list-snippets labels. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
Pin down the on-disk contract and the load semantics of directory snippets — download, turbo load, update, status, reset, delete and the failure paths — rather than the transport. Register the suite in the tests workflow matrix. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
Drop Subversion from the svn/atpull/reset ice tables and from the status and update command tables, and point the Oh-My-Zsh example at the renamed macos plugin. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
`zinit version' printed a bare DIFF marker before the version line. It was debugging residue from the svn-to-git work and never meant to ship. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
`git describe --tags' fails outright on a clone made with --depth or --no-tags, so `zinit version' printed a fatal error and an empty version. The test suite clones exactly that way, and it now runs `zinit version' during bootstrap. Fall back to the VERSION file plus the short sha, keeping the shape `describe' would have produced, and report `unknown' rather than borrowing a version from an enclosing repository when BIN_DIR holds no repository at all. Replace --git-dir=$(realpath …/.git) with `git -C': a linked worktree and a submodule have a .git file rather than a directory. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
vladdoster
force-pushed
the
remove-svn-dependency
branch
2 times, most recently
from
July 25, 2026 04:16
9818d89 to
ffe8aae
Compare
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
vladdoster
force-pushed
the
remove-svn-dependency
branch
from
July 25, 2026 04:20
ffe8aae to
c33288b
Compare
Skip tj/mmake when no x86_64-capable make is available, keep ERR_EXIT from aborting the hook-handler setup, strip color before asserting on the ice suffix list and pre-install zdharma-continuum/null, and disable jemalloc for the macOS tmux build. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
These tests are ordered download-first/delete-last and share disk state, so the header warned against running the file with `zunit -p' at all. zunit now treats a test file as a single unit of work, which makes -p safe here; what breaks the file is --slice, where every worker sources the bootstrap and so gets its own empty $zi_test_dir. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
Each test now declares what it needs up front -- `discard' for the snippets whose download it asserts on, `provide_macos' for the ones it only reads, and `ensure_snippets_home' for the $SNIPPETS skeleton that `zinit delete' sweeps away. Declaration order is a readability choice again rather than a contract, so the file is safe under `zunit -p', `--slice' and `--slice -p' alike, which reverses the warning added in 337d308. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
Each matrix job runs one test file, so --slice is what parallelizes the work inside it. tests/svn.zunit was the last file that could not be split -- every worker sources the bootstrap and gets its own empty $zi_test_dir -- and 07580cf made each of its tests declare what it needs up front, so the flag is now safe suite-wide. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
5101628 turned on --slice for every matrix job, but only gh-r and plugins are large enough for the worker startup cost to pay for itself. Move the flag into a matrix.zunit_flag set by an include block, so the other seven suites run zunit unsliced. Drops the hardcoded --verbose along with it; verbosity belongs in .zunit.yml. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
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.
.zinit-mirror-using-svnis now ablobless, depth-1
git fetchwhose sub-tree is committed as a root commit and checked out,reproducing the flat layout
svn checkoutgave with a cleangit status. Subversion isneither used nor required; the ice name stays for compatibility.
.svnworking copies migrate in place on the next update. A failed first downloadrolls back completely; a failed migration leaves the installed snippet untouched.
zinit statusprints the last commit plus local modifications for directory snippets and stillanswers "is this stale?" via a ref-advertisement probe of the upstream sub-tree.
reset''/-ruses
git reset --hard.._zinit/modeinstead of probing for.svn, andzinit snippetnow fails on a failed download instead of registering a snippet that isn't there.zinit versionfalls back toVERSION+ short sha whengit describe --tagsfinds noreachable tags (shallow /
--no-tagsclones).tests/svn.zunitcovers download, turbo load, update, status, reset, delete and the failurepaths; README and
doc/zinit.1drop Subversion from the ice and command tables.