Skip to content

build: ship the moq-cli crate as moq on Docker, Nix, and winget - #4030

Merged
kixelated merged 3 commits into
mainfrom
claude/ship-cli-as-moq
Sep 24, 2026
Merged

kixelated merged 3 commits into
mainfrom
claude/ship-cli-as-moq

Conversation

@kixelated

@kixelated kixelated commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The CLI binary is moq, and Homebrew, apt, and dnf already ship it as moq. Docker (moqdev/moq-cli), the flake (#moq-cli), and winget (moq-dev.moq-cli, not yet published) still use the crate name.

Approach

  • Docker: the moq-cli-v* tag builds and pushes moqdev/moq. The workflow input stays a crate name, since release.sh parse-version reads rs/<crate>/Cargo.toml.
  • Nix: the flake package is moq (nix run github:moq-dev/moq#moq); Cachix maps the moq-cli tag to it. The overlay attribute stays moq-cli: nixpkgs already has an unrelated moq (a Go mock generator), which an overlay moq would shadow.
  • winget: the identifier is moq-dev.moq. The first manifest is New package: moq-dev.moq version 0.12.1 microsoft/winget-pkgs#440566.
  • crates.io: unchanged. moq there is owned by another project.
  • Docs: doc/setup/install.md and rs/moq-cli/README.md.

Impact

  • moqdev/moq-cli and #moq-cli stop at 0.12.2 and refuse instead of going stale: each moq-cli release points moqdev/moq-cli:latest at a busybox stub that prints moqdev/moq-cli is now moqdev/moq and exits 1, and the #moq-cli flake package is a moq script that prints the new name and exits 1. Version-pinned images and pinned flake tags keep working.
  • Before the next moq-cli release: create moqdev/moq on Docker Hub as a public repo, or the first push may create it private.
  • Release tags, GitHub release assets, and the crate name are unchanged. No public API or wire changes.

Verification

nix eval .#moq.name and .#default evaluate; nix run .#moq-cli prints the refusal and exits 1; the stub image, built locally, does the same; actionlint and just check pass. The Docker and Cachix tag paths only run on a release tag.

(written by Claude Opus 5.5)

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9d1da4fe-15d2-42f4-b185-ed6bb9362968

📥 Commits

Reviewing files that changed from the base of the PR and between 7fbdba8 and 595cb19.

📒 Files selected for processing (7)
  • .github/workflows/cachix.yml
  • .github/workflows/docker.yml
  • .github/workflows/release-winget.yml
  • Dockerfile
  • doc/setup/install.md
  • flake.nix
  • rs/moq-cli/README.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T19:38:47.076826Z 595cb19 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b80a7be48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread flake.nix

# Named after the executable. The overlay keeps `moq-cli` because
# nixpkgs already has an unrelated `moq`.
moq = overlayPkgs.moq-cli;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move the published package rename to dev

Because this commit is based on main, replacing packages.moq-cli with only packages.moq makes every unpinned nix ...#moq-cli invocation fail as soon as main advances; the same release also stops updating moqdev/moq-cli. These are published consumer names that worked through 0.12.1, so this is a breaking distribution-surface change on the additive branch. Retarget the rename to dev rather than landing it on main.

AGENTS.md reference: AGENTS.md:L60-L60

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Kept on main by maintainer decision. The old names refuse loudly instead of going stale: moqdev/moq-cli:latest becomes a stub that exits 1 naming moqdev/moq, and #moq-cli is a script that does the same. moq-cli 0.12.2 shipped under the old names before this merges.

(written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

MERGE

Positive improvement? Yes. Homebrew, apt, and dnf already ship the binary as moq; this brings Docker (moqdev/moq), the flake package (#moq), and winget (moq-dev.moq) in line with the executable. Leaving crates.io as moq-cli and the Nix overlay attribute as moq-cli is the right call given the name collisions you call out.

Worth the complexity? Yes. The cost is two small remaps (Cachix tag → flake attr, Docker crate input → image/package name) plus a flake packages rename. That is proportional to the inconsistency it removes. Docs call out the hard cut at 0.12.1 for moqdev/moq-cli and #moq-cli, which is honest about the break.

Different approach? Temporary aliases (#moq-cli = moq, or retagging the old Docker name for one release) would soften migration, but they keep the dual naming you are trying to end, and winget is not published yet. A hard cut with clear docs is fine here. Optional follow-up, not a blocker: create the public moqdev/moq Docker Hub repo before the next moq-cli-v* tag so the first push does not land private.

Looks good to merge as-is.

This is an automated review, not the maintainer's decision
(Written by Grok)

kixelated and others added 3 commits September 24, 2026 12:35
Homebrew, apt, and dnf already name the package after the executable.
crates.io keeps moq-cli because another project owns moq there, and the
Nix overlay keeps moq-cli because nixpkgs has an unrelated moq.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated force-pushed the claude/ship-cli-as-moq branch from 764ee6b to 595cb19 Compare September 24, 2026 19:35
@kixelated
kixelated merged commit d578104 into main Sep 24, 2026
5 checks passed
@kixelated

Copy link
Copy Markdown
Collaborator Author

Rebased onto main after the #4013 release. moq-cli 0.12.2 shipped under the old names from the moq-cli-v0.12.2 tag, so the docker.yml, flake.nix, and install.md notes (and the description) now say the old names stop at 0.12.2 instead of 0.12.1. The 0.12.2 winget run was already dispatched from pre-merge main. Auto-merge (squash) enabled.

Before the next moq-cli release: create the public moqdev/moq repo on Docker Hub.

(written by Claude Opus 5.5)

@kixelated
kixelated deleted the claude/ship-cli-as-moq branch September 24, 2026 20:37
@moq-bot moq-bot Bot mentioned this pull request Sep 24, 2026
@moq-bot moq-bot Bot mentioned this pull request Sep 25, 2026
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