Skip to content

mrdocs 2026.9.29 (new formula) - #315311

Draft
liuq wants to merge 1 commit into
Homebrew:mainfrom
liuq:mrdocs
Draft

liuq wants to merge 1 commit into
Homebrew:mainfrom
liuq:mrdocs

Conversation

@liuq

@liuq liuq commented Oct 4, 2026

Copy link
Copy Markdown

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?
  • Is your test running fine brew test <formula>?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

New formula for MrDocs, a C++ reference documentation generator built on Clang (172 stars, Apache-2.0 WITH LLVM-exception).

brew audit --strict and brew lgtm pass. brew audit --new reports one problem, which is why that box is unticked:

Formulae should not require patches to build. Patches should be submitted and accepted upstream first.

The patch adds a missing explicit template instantiation. Without it, linking mrdocs against Homebrew's llvm 23.1.2 fails with an undefined ASTVisitor::populate<unsigned long long> symbol, because the compiler inlines the implicit instantiation. The fix is submitted upstream as cppalliance/mrdocs#1334 and is under review. If you'd prefer to wait until it's merged and released, I'm happy to keep this as a draft and drop the patch with the next release.

Notes on the build:

  • LLVM: upstream's bootstrap pins an LLVM 23 development snapshot. This formula builds against depends_on "llvm" (23.1.2) instead.
  • Lua: uses the lua formula (5.5). mrdocs looks for a Lua::lua CMake package, so the formula writes a minimal LuaConfig.cmake that points at it. All seven upstream Lua extension golden fixtures produce output identical to the expected results with Lua 5.5.
  • JerryScript: vendored as a resource. mrdocs needs it built with JERRY_EXTERNAL_CONTEXT and its own context header (from utils/bootstrap/patches/jerryscript), which the jerryscript formula doesn't provide.
  • Source: fetched with git at the tag, because the build reads the release label (2026.9.29) from git history.
  • Test: generates AsciiDoc for a header through a compilation database, with a Lua extension that renames the function, and checks the renamed output.

Built and tested locally on macOS 27 (arm64). The same formula (apart from head and an explicit livecheck block) also builds, passes brew test and passes brew audit --strict on macos-latest and ubuntu-latest in my tap's CI: https://github.com/liuq/homebrew-mrdocs/actions/runs/37187438831

AI disclosure

I used Claude Code (Claude Opus 5.5) to draft the formula, investigate the link failure, write the upstream fix, and run the build, test and audit commands. I reviewed the formula and the results myself and will handle review comments personally.

Copilot AI balanced review requested due to automatic review settings October 4, 2026 08:07
@github-actions github-actions Bot added lua Lua use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core missing network sandbox The formula does not define network sandbox settings labels Oct 4, 2026
@github-actions github-actions Bot removed the missing network sandbox The formula does not define network sandbox settings label Oct 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

馃煛 Changes recommended

The formula cannot pass the mandatory new-formula audit until its upstream build patch is accepted or released.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds MrDocs as a source-built formula with LLVM, Lua, and JerryScript integration.

Changes:

  • Adds build dependencies and custom dependency configuration.
  • Applies an upstream build patch.
  • Adds a functional documentation-generation test.
File Description
Formula/鈥媘/鈥媘rdocs.rb Defines the MrDocs formula, build process, patch, and test.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Formula/m/mrdocs.rb
# Missing explicit instantiation; the link fails when the compiler inlines
# the implicit one (e.g. with Homebrew's LLVM 23.1).
# https://github.com/cppalliance/mrdocs/pull/1334
patch :DATA
Comment thread Formula/m/mrdocs.rb
# Missing explicit instantiation; the link fails when the compiler inlines
# the implicit one (e.g. with Homebrew's LLVM 23.1).
# https://github.com/cppalliance/mrdocs/pull/1334
patch :DATA

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

New formula should have no patch in general.

@liuq liuq Oct 4, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ok, got it: I wait for the companion PR to mrdocs to be included and eventually renew this PR (now it's back in draft).

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for contributing to Homebrew! 馃帀 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@liuq
liuq marked this pull request as draft October 4, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lua Lua use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants