Skip to content

fix: main detection beside a compiled module, and the spec's main on the plugin in every hook - #57

Merged
zuqini merged 9 commits into
mainfrom
main-detection-followup
Nov 15, 2026
Merged

zuqini merged 9 commits into
mainfrom
main-detection-followup

Conversation

@zuqini

@zuqini zuqini commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Two follow-ups to #55.

Fixes

A detected main is still set before the first config runs.

resolve_main no longer reads the spec's main itself: registration is the only writer of an explicit main, so its spec parameter is gone.

Known difference from lazy.nvim

Only a Lua module is matched against the plugin's name: foo.nvim with lua/foo.so beside another module gets no main, where lazy.nvim takes foo. :h zpack-Spec.main says so.

Docs

:h zpack-Spec.main says how a compiled module counts. The plugin.main reference lines in doc/zpack.txt, docs/spec.md and types.lua say the spec's main is there in every hook.

Testing

  • Each fix has a test that fails without it. No existing test was changed.
  • luacheck and LuaLS are clean. The suite passes on nightly (1512) and v0.12.0 (1511).
  • zb check against the base: no lazy flips, structural or opts differences; no perf row flagged.

@zuqini
zuqini merged commit 5b76441 into main Nov 15, 2026
4 checks passed
@zuqini
zuqini deleted the main-detection-followup branch November 15, 2026 05:42
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