Skip to content

fix(minimald): hide unplumbed --stdlib-dir and -n args from help - #846

Merged
norrietaylor merged 1 commit into
mainfrom
hide-unused-minimald-args
Jul 20, 2026
Merged

fix(minimald): hide unplumbed --stdlib-dir and -n args from help#846
norrietaylor merged 1 commit into
mainfrom
hide-unused-minimald-args

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

minimald's GlobalArgs declares --stdlib-dir and -n/--num-parallel-builds, but neither is read anywhere in the daemon — the microVM path hardcodes both to None and the server Config consumes neither. --stdlib-dir was hidden only outside MINIMAL_SCIENCE_MODE, while -n was fully user-visible dead surface.

This hides both unconditionally with #[clap(hide = true)] so they no longer appear in help output. Since neither is plumbed even in science mode, there's no reason to surface them there. The flags still parse and are silently accepted, so any caller already passing them keeps working.

Change

     /// Load the minimal standard library from the given path instead
     #[arg(long)]
-    #[clap(hide = !std::env::var("MINIMAL_SCIENCE_MODE").is_ok())]
+    #[clap(hide = true)]
     stdlib_dir: Option<CwdRelative<Daemon>>,

     /// Configure the number of parallel builds
     #[arg(short, long, global = true)]
+    #[clap(hide = true)]
     num_parallel_builds: Option<usize>,

Testing

  • cargo build -p minimald
  • cargo clippy -p minimald --all-targets -- -D warnings
  • cargo fmt -p minimald

Closes #825

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • The --stdlib-dir command-line option is now consistently hidden from help output.

`GlobalArgs` declared `--stdlib-dir` and `-n`/`--num-parallel-builds`,
but neither is read anywhere in the daemon: the microVM path hardcodes
both to `None` and the server `Config` consumes neither. `--stdlib-dir`
was hidden only outside `MINIMAL_SCIENCE_MODE`, and `-n` was fully
user-visible dead surface.

Hide both unconditionally with `hide = true` so they no longer appear in
help output. They are not plumbed even in science mode, so there is no
reason to surface them there either. The flags still parse and are
silently accepted, preserving backward compatibility for any callers
already passing them.

Closes: #825

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 38dbc752-8748-4c18-becb-b1940297e894

📥 Commits

Reviewing files that changed from the base of the PR and between b47efdb and d59c3cc.

📒 Files selected for processing (1)
  • crates/minimald/src/main.rs

📝 Walkthrough

Walkthrough

The minimald CLI now unconditionally hides --stdlib-dir from Clap-generated help output instead of basing visibility on MINIMAL_SCIENCE_MODE.

Changes

minimald CLI

Layer / File(s) Summary
Unconditionally hide stdlib directory option
crates/minimald/src/main.rs
The GlobalArgs.stdlib_dir field uses #[clap(hide = true)], removing environment-dependent help visibility.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

  • gominimal/minimal issue 820: Directly concerns the same --stdlib-dir help-visibility change.
  • gominimal/inbox issue 312: Concerns the same minimald GlobalArgs.stdlib_dir declaration and visibility behavior.

Suggested reviewers: twitchyliquid64

Poem

A bunny hid a flag from sight,
No more appearing in help’s light.
The science switch can hop away,
Clap keeps secrets night and day.
Thump, thump—the CLI’s neat!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: hiding unplumbed minimald CLI flags from help.
Linked Issues check ✅ Passed The PR hides the ignored CLI flags from help while keeping them parseable, which satisfies issue #825.
Out of Scope Changes check ✅ Passed The changes are limited to hiding the dead CLI surface and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@norrietaylor
norrietaylor merged commit a77b788 into main Jul 20, 2026
28 checks passed
@norrietaylor
norrietaylor deleted the hide-unused-minimald-args branch July 20, 2026 18:16
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.

minimald accepts but ignores -n/--num-parallel-builds and --stdlib-dir

2 participants