Skip to content

docs: add a guide section to the scaladoc site - #50

Merged
halotukozak merged 2 commits into
mainfrom
docs-site
Sep 2, 2026
Merged

docs: add a guide section to the scaladoc site#50
halotukozak merged 2 commits into
mainfrom
docs-site

Conversation

@halotukozak

@halotukozak halotukozak commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

What

Turns on a Docs section on the scaladoc site (mcodec.halotukozak.com), alongside the existing API reference. Same layout as made and alpaca — scala-cli auto-detects docs/ as the siteroot, so this is docs/_docs/*.md + docs/sidebar.yml with no workflow change.

Pages

page source
index verbatim copy of README.md, rendered as the Docs landing
Getting Started new — deriving, built-ins, ADT wire shape
Annotations new — @name, @transparent, @flatten, @defaultCase, @stringEnum, @transientDefault, @outOfOrder, with the exact wire shapes from the test suite
Combinators new — transform, transformed, nullable, makeLazy, create, forceTransientDefaults
Backends new — the Input/Output model, the JSON backend, BSON/CBOR status
Benchmarks moved from docs/benchmarks.md

Every scala snippet in the guides compiles under -snippet-compiler:compile (the flag already in docs.yaml). Prose was run through the stop-slop pass.

Also in this PR

  • docs/assets/benchmarks/*.pngdocs/_assets/images/benchmarks/ (scaladoc asset convention); benchmark/scripts/{plot,aggregate}.py updated to write there.
  • README.md: the sbt/mill install blocks are tagged sc:nocompile (not valid Scala — they'd fail the snippet compiler now that index.md renders), and import made.annotation.nameimport halotukozak.made.annotation.name (the short form doesn't exist).

Note for maintainers

docs/_docs/index.md must stay byte-identical to README.md (diff README.md docs/_docs/index.md). Same manual-sync arrangement as made — no hook added.

🤖 Generated with Claude Code


Also fixes an incomplete --exclude benchmark rollout from #47: the MiMa workflow's baseline package ($RUNNER_TEMP/old-src) now also excludes benchmark/, since the baseline commit now contains the Scala 2.13 benchmark/gencodec build.

scala-cli auto-detects docs/ as the scaladoc siteroot, so adding docs/_docs/
pages + docs/sidebar.yml turns on the "Docs" tab alongside the API — no workflow
change. Matches the layout used in made and alpaca.

Pages:
- index.md — a verbatim copy of README.md (rendered as the Docs landing)
- getting-started, annotations, combinators, backends — guides written against
  the current API, every scala snippet compiles under -snippet-compiler:compile
- benchmarks — the report, moved from docs/benchmarks.md; images moved to
  docs/_assets/images/benchmarks/ and the benchmark scripts updated to match

README: the sbt/mill install blocks are marked `sc:nocompile` (they aren't
valid Scala and would fail the snippet compiler now that index.md renders), and
`import made.annotation.name` is corrected to `halotukozak.made.annotation.name`.

Keep docs/_docs/index.md byte-identical to README.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCfiQMwXigsoCeMcR3jXP6
Copilot AI lite review requested due to automatic review settings September 2, 2026 11:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The MiMa baseline is now a worktree of a commit that contains benchmark/
(everything since #47), so `scala-cli package "$RUNNER_TEMP/old-src"` picks up
benchmark/gencodec (Scala 2.13) and fails to resolve its deps. Completes the
--exclude benchmark rollout started in #47.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCfiQMwXigsoCeMcR3jXP6
@halotukozak
halotukozak merged commit b81a983 into main Sep 2, 2026
8 checks passed
@halotukozak
halotukozak deleted the docs-site branch September 2, 2026 12:03
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.

2 participants