docs: warning-free build, gated in precommit - #142
Merged
Conversation
ausimian
force-pushed
the
docs/skip-autolink-internal
branch
from
May 31, 2026 12:43
1ffda9f to
71e2ce2
Compare
Add a docs_check precommit step that builds the published docs surface (the :docs env, as `mix hex.publish` does) with --warnings-as-errors, failing on any ExDoc warning — autolinks to hidden/undefined symbols, broken refs, etc. It runs as a subprocess in :docs rather than precommit's own :test env, so test/support fixtures and their `only: :test` deps (e.g. Axon) stay out of scope. CI runs mix precommit, so merges are gated too. Pin the symbols ExDoc can't link in :skip_code_autolink_to as an explicit list (Emily.Native + its NIF shims, the hidden Emily.Backend.block/4 callback, private Nx internals) so the build is warning-free. Explicit rather than a catch-all predicate: the gate now fails with the exact unlinkable symbol when a new one appears, keeping each addition a deliberate one-liner instead of silently auto-skipped.
ausimian
force-pushed
the
docs/skip-autolink-internal
branch
from
May 31, 2026 13:04
71e2ce2 to
505b39b
Compare
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.
Makes
mix docswarning-free and keeps it that way.What
:skip_code_autolink_to(explicit list). Symbols ExDoc can't link —Emily.Native+ its NIF shims (@moduledoc false), the hiddenEmily.Backend.block/4callback, and private/external Nx internals. Listed explicitly rather than via a catch-all predicate so the gate below fails with the exact unlinkable symbol when a new one appears — each addition is a deliberate one-liner, never silently auto-skipped. (A module entry doesn't cover its members, so each referenced function is listed.)docs_checkprecommit step. Builds the published docs surface (the:docsenv, asmix hex.publishdoes) with--warnings-as-errors, failing on any ExDoc warning. Runs as a subprocess in:docsrather than precommit's:testenv sotest/support/fixtures and theironly: :testdeps (e.g. Axon) stay out of scope. CI runsmix precommit, so merges are gated too.Why this shape
The 0.6.0
Emily.Native.*references thatmix publishosplices fromRELEASE.mdintoCHANGELOG.mdwere producing permanent autolink warnings. Centralizing the skips inmix.exsdecouples the fix from release-note authoring; the precommit gate makes the explicit list self-maintaining (it tells you exactly what to add).Verified:
MIX_ENV=docs mix docsemits 0 warnings; fullmix precommitgreen (543 tests, 0 failures) with the gate active.