Skip to content

Add broot package#160

Closed
jtnkminimal wants to merge 2 commits into
mainfrom
add-broot
Closed

Add broot package#160
jtnkminimal wants to merge 2 commits into
mainfrom
add-broot

Conversation

@jtnkminimal
Copy link
Copy Markdown
Contributor

@jtnkminimal jtnkminimal commented May 8, 2026

broot v1.56.2 — interactive tree-style file browser/launcher.

Summary by CodeRabbit

  • Chores
    • Added build configuration for the broot package, pinned to version 1.56.2, including package metadata (version, license, source).
    • Installs the broot executable into the system path as part of the package output.
    • Integrated shell completion support for Bash, Fish, and Zsh.

broot v1.56.2 — interactive tree-style file browser/launcher.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

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 Plus

Run ID: a960c464-a655-4616-a289-d9de1f725622

📥 Commits

Reviewing files that changed from the base of the PR and between 7577ed7 and 385d427.

📒 Files selected for processing (1)
  • packages/broot/build.ncl

📝 Walkthrough

Walkthrough

Adds a Nickel BuildSpec for broot v1.56.2 plus a Bash build script that builds the Rust release, installs the broot binary, and installs shell completions.

Changes

broot Package Build Specification

Layer / File(s) Summary
Build configuration & source
packages/broot/build.ncl
Imports shared build modules, pins version = "1.56.2", and fetches the verified broot tarball as a build dependency.
Runtime needs & deps
packages/broot/build.ncl
Declares needs = { dns, internet } and runtime deps: glibc plus a libgcc subset from the gcc module.
Build command & outputs
packages/broot/build.ncl
Sets cmd = ./build.sh with build_args passing the pinned version; defines outputs for usr/bin/broot and usr/share/**/broot*; sets package attrs (upstream_version, SPDX license, GitHub provenance, build_cost_multiple).
Build script: header & env
packages/broot/build.sh
Adds Bash header with set -euo pipefail; sets CC/LD to gcc and RUSTFLAGS to force linking with gcc and remap build/cache paths for deterministic builds.
Build and install artifacts
packages/broot/build.sh
Runs cargo build --release, installs the built broot binary into $OUTPUT_DIR/usr/bin/broot, locates build.rs completion output, and installs Bash/Fish/Zsh completions into $OUTPUT_DIR.

Sequence Diagram(s)

sequenceDiagram
  participant Upstream
  participant BuildSpec
  participant Script
  participant Cargo
  participant Output
  Upstream->>BuildSpec: provide source tarball
  BuildSpec->>Script: invoke ./build.sh (version)
  Script->>Cargo: cargo build --release
  Cargo->>Script: produce binary + completions
  Script->>Output: install binary and completions into $OUTPUT_DIR
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through tarballs, flags held tight,
Built release with cargo into the night,
GCC paths tidy, completions in store,
Broot springs up and hops to the door,
Versioned, packaged — ready to delight.

🚥 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 'Add broot package' directly and clearly describes the main change: introducing a new broot package with build specifications and scripts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-broot

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/broot/build.ncl`:
- Around line 39-42: The completions output declaration (outputs -> completions)
currently uses glob "usr/share/**/broot*" which misses the zsh file named
"_broot"; update the completions OutputData glob to explicitly include the zsh
artifact (e.g., add a pattern matching "_broot" such as "usr/share/**/_broot" or
expand the glob to include both "broot*" and "_broot") so the zsh completion
file produced by build.sh is captured by the completions output.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5583bce0-26fc-4aa9-b5cb-e91eab544e98

📥 Commits

Reviewing files that changed from the base of the PR and between cc650fc and 7577ed7.

📒 Files selected for processing (2)
  • packages/broot/build.ncl
  • packages/broot/build.sh

Comment thread packages/broot/build.ncl
Comment on lines +39 to +42
outputs = {
broot = { glob = "usr/bin/broot" } | OutputBin,
completions = { glob = "usr/share/**/broot*" } | OutputData,
},
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Declared completion output misses zsh _broot artifact.

Line 41 uses usr/share/**/broot*, but the zsh file installed by build.sh is _broot (underscore prefix), so it won’t be captured by this output declaration.

Proposed fix
   outputs = {
     broot = { glob = "usr/bin/broot" } | OutputBin,
     completions = { glob = "usr/share/**/broot*" } | OutputData,
+    zsh_completion = { glob = "usr/share/zsh/site-functions/_broot" } | OutputData,
   },

As per coding guidelines: "Explicitly declare all outputs using OutputBin, OutputLib, or OutputData with glob patterns matching what build.sh installs".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
outputs = {
broot = { glob = "usr/bin/broot" } | OutputBin,
completions = { glob = "usr/share/**/broot*" } | OutputData,
},
outputs = {
broot = { glob = "usr/bin/broot" } | OutputBin,
completions = { glob = "usr/share/**/broot*" } | OutputData,
zsh_completion = { glob = "usr/share/zsh/site-functions/_broot" } | OutputData,
},
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/broot/build.ncl` around lines 39 - 42, The completions output
declaration (outputs -> completions) currently uses glob "usr/share/**/broot*"
which misses the zsh file named "_broot"; update the completions OutputData glob
to explicitly include the zsh artifact (e.g., add a pattern matching "_broot"
such as "usr/share/**/_broot" or expand the glob to include both "broot*" and
"_broot") so the zsh completion file produced by build.sh is captured by the
completions output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jtnkminimal jtnkminimal mentioned this pull request May 26, 2026
@jtnkminimal
Copy link
Copy Markdown
Contributor Author

Superseded by #194 — fresh branch off current main, plus a fix to capture the zsh _broot completion.

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