Skip to content

Restore the missing Zinit completion link - #393

Merged
jiminu merged 1 commit into
mainfrom
fix/zinit-completion-restore
Oct 14, 2026
Merged

jiminu merged 1 commit into
mainfrom
fix/zinit-completion-restore

Conversation

@jiminu

@jiminu jiminu commented Oct 14, 2026

Copy link
Copy Markdown
Owner

On installs from v1.4.0 through v1.6.9, provisioning left _zinit pointing into a deleted staging directory. Zinit's first interactive shell then removed it as stray and never recreated it, because the completions directory already existed. The v1.6.10 cleanup relinked _zinit only while that dangling link survived, so most affected installs still had no zinit completion. Fresh installs since v1.6.10 are unaffected: Zinit creates the directory and _zinit on first shell.

Tools synchronization now removes every dangling staging link, including _zinit, and then creates _zinit -> zinit.git/_zinit when neither _zinit nor its disabled form zinit exists. The link is created only in an empty slot, so the atomic swap helper extracted in #392 is reverted. This remains temporary migration code alongside the #392 cleanup.

Validation:

  • bash scripts/check.sh: syntax, ShellCheck, formatting, Go vet, cross-builds, and all tests pass except TestNeovimDAPConfiguration, which fails identically on main locally.
  • Mutation checks: dropping the restore, ignoring the disabled zinit form, or skipping link removal each fails TestZinitCleansDanglingStagingCompletions.
  • A probe with the pinned Zinit and a temporary HOME reproduced the loss on v1.6.9 and the correct first-shell _zinit on v1.6.10. Running the cleanup on a copy of an already repaired completions directory left it unchanged.

On installs from v1.4.0 through v1.6.9, Zinit's first shell removed the
dangling _zinit staging link and never recreated it, because the completions
directory already existed. The v1.6.10 cleanup only relinked a _zinit that was
still dangling, so most affected installs kept no Zinit completion.

Remove every dangling staging link, then create _zinit when neither it nor
its disabled form exists. Creating the link only in an empty slot replaces the
atomic swap, so the release link helper returns to its original form.
@jiminu
jiminu merged commit 082fd8c into main Oct 14, 2026
7 checks passed
@jiminu
jiminu deleted the fix/zinit-completion-restore branch October 14, 2026 14:22
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