Motivation
Discovered while debugging a slow real-machine zsh startup: the machine had both
devboost's own znap (loading zsh-users/zsh-autosuggestions and
zsh-users/zsh-syntax-highlighting) and a separately pre-existing zinit setup
(loading zdharma-continuum/fast-syntax-highlighting, zsh-users/zsh-autosuggestions,
zsh-users/zsh-completions, plus several zinit annexes) active at the same time.
zprof showed zinit-related plugin loading at ~55% of total (already-fast, ~60ms)
shell init time, with znap's own loading on top of that — clearly redundant, and a
plausible contributor to the user's still-not-instant shell startup.
Decision from conversation: zinit is the more feature-complete option (the user's
own hand-tuned setup already relies on it, including zsh-completions and multiple
annexes that znap doesn't have equivalents for) — so rather than just detecting the
conflict and asking the user to pick one, devboost should migrate its own default to
zinit, matching what real users are already reaching for.
Scope
This is a real default-behavior change, not a quick swap:
- Rewrite
modules/module_znap.sh → modules/module_zinit.sh (different install
method: zinit self-installs via its own bootstrap, not a plain git clone like
znap).
- Update
modules/module_zsh.sh's generated .zshrc.devboost content — zinit's
config style (zinit light, ice-modifiers like zinit ice wait lucid, etc.) is
meaningfully different from znap's simpler znap source API. Need to decide how
much of zinit's turbo-mode/lazy-loading features devboost should turn on by default
(could itself reduce startup time further, e.g. wait lucid deferred loading).
- Update
.devboost.yaml.example (currently has znap_path, znap_git config keys
under zsh:).
- Update README's tool list and
ARCHITECTURE.md.
- Update/add tests (currently
tests/test-macos.sh etc. don't specifically assert on
which plugin manager is used, but any config-content assertions may need updates).
- Decide: does devboost detect an existing znap install on a user's machine (from a
previous devboost version) and migrate it, or is this a clean cutover with a
migration note in CHANGELOG/README for existing users?
- Add a doctor check (in the health-check module, once it exists — see related issue)
that warns if another zsh plugin manager (oh-my-zsh, antidote, zplug, or a stray
znap left over from before this migration) is active alongside zinit, same pattern
as the oh-my-zsh detection.
Relates to
- module_health.sh environment health checks issue
- zsh startup slowness investigation issue
Motivation
Discovered while debugging a slow real-machine zsh startup: the machine had both
devboost's own
znap(loadingzsh-users/zsh-autosuggestionsandzsh-users/zsh-syntax-highlighting) and a separately pre-existingzinitsetup(loading
zdharma-continuum/fast-syntax-highlighting,zsh-users/zsh-autosuggestions,zsh-users/zsh-completions, plus several zinit annexes) active at the same time.zprofshowedzinit-related plugin loading at ~55% of total (already-fast, ~60ms)shell init time, with znap's own loading on top of that — clearly redundant, and a
plausible contributor to the user's still-not-instant shell startup.
Decision from conversation: zinit is the more feature-complete option (the user's
own hand-tuned setup already relies on it, including zsh-completions and multiple
annexes that znap doesn't have equivalents for) — so rather than just detecting the
conflict and asking the user to pick one, devboost should migrate its own default to
zinit, matching what real users are already reaching for.
Scope
This is a real default-behavior change, not a quick swap:
modules/module_znap.sh→modules/module_zinit.sh(different installmethod: zinit self-installs via its own bootstrap, not a plain
git clonelikeznap).
modules/module_zsh.sh's generated.zshrc.devboostcontent — zinit'sconfig style (
zinit light, ice-modifiers likezinit ice wait lucid, etc.) ismeaningfully different from znap's simpler
znap sourceAPI. Need to decide howmuch of zinit's turbo-mode/lazy-loading features devboost should turn on by default
(could itself reduce startup time further, e.g.
wait luciddeferred loading)..devboost.yaml.example(currently hasznap_path,znap_gitconfig keysunder
zsh:).ARCHITECTURE.md.tests/test-macos.shetc. don't specifically assert onwhich plugin manager is used, but any config-content assertions may need updates).
previous devboost version) and migrate it, or is this a clean cutover with a
migration note in CHANGELOG/README for existing users?
that warns if another zsh plugin manager (oh-my-zsh, antidote, zplug, or a stray
znap left over from before this migration) is active alongside zinit, same pattern
as the oh-my-zsh detection.
Relates to