Skip to content

docs: warning-free build, gated in precommit - #142

Merged
ausimian merged 1 commit into
mainfrom
docs/skip-autolink-internal
May 31, 2026
Merged

docs: warning-free build, gated in precommit#142
ausimian merged 1 commit into
mainfrom
docs/skip-autolink-internal

Conversation

@ausimian

@ausimian ausimian commented May 31, 2026

Copy link
Copy Markdown
Owner

Makes mix docs warning-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 hidden Emily.Backend.block/4 callback, 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_check precommit step. Builds the published docs surface (the :docs env, as mix hex.publish does) with --warnings-as-errors, failing on any ExDoc warning. Runs as a subprocess in :docs rather than precommit's :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.

Why this shape

The 0.6.0 Emily.Native.* references that mix publisho splices from RELEASE.md into CHANGELOG.md were producing permanent autolink warnings. Centralizing the skips in mix.exs decouples 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 docs emits 0 warnings; full mix precommit green (543 tests, 0 failures) with the gate active.

@ausimian
ausimian force-pushed the docs/skip-autolink-internal branch from 1ffda9f to 71e2ce2 Compare May 31, 2026 12:43
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
ausimian force-pushed the docs/skip-autolink-internal branch from 71e2ce2 to 505b39b Compare May 31, 2026 13:04
@ausimian ausimian changed the title docs: skip autolinking to internal/hidden symbols (warning-free build) docs: warning-free build, gated in precommit May 31, 2026
@ausimian
ausimian merged commit eae28a6 into main May 31, 2026
3 checks passed
@ausimian
ausimian deleted the docs/skip-autolink-internal branch May 31, 2026 13:07
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