Skip to content

Add broot package#194

Open
jtnkminimal wants to merge 1 commit into
mainfrom
add-broot-clean
Open

Add broot package#194
jtnkminimal wants to merge 1 commit into
mainfrom
add-broot-clean

Conversation

@jtnkminimal
Copy link
Copy Markdown
Contributor

@jtnkminimal jtnkminimal commented May 26, 2026

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

Fresh branch off current main, replacing #160 (which was 26 commits behind). Carries one fix over that PR: shell completions are now declared as explicit per-shell outputs because the zsh completion file is named _broot, which the previous single usr/share/**/broot* glob silently dropped.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added build configuration and scripts for the broot package (v1.56.2), including compilation settings and shell completion file installation.

Review Change Stack

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

Captures bash/fish/zsh shell completions as explicit per-shell outputs
(the zsh file is named `_broot`, which a single `broot*` glob misses).

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

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jake King seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

📝 Walkthrough

Walkthrough

This pull request introduces a new package build specification for broot (version 1.56.2). The recipe defines the build process with required dependencies, source verification, and installation targets, while the build script handles compilation, binary installation, and shell completion artifact installation.

Changes

Broot package build specification

Layer / File(s) Summary
Build recipe definition
packages/broot/build.ncl
Defines broot package recipe with version 1.56.2, imports shared build modules, pins source tarball with SHA256 verification, declares build dependencies (build.sh, rust, toolchain, gcc, glibc), specifies runtime dependencies (glibc, libgcc), and declares outputs for the binary and shell completion files plus metadata attributes.
Build script implementation
packages/broot/build.sh
Sets up build environment with GCC linker and Rust flags for reproducibility, builds the project in release mode, installs the broot binary to the output directory, and post-build installs bash, fish, and zsh completion files from Cargo artifacts into their respective vendor directories.

🎯 2 (Simple) | ⏱️ ~8 minutes

🐰 A broot takes root so deep,
With Nickel specs and build steps neat,
Completions bloom from rustc's care,
Now shells have choices everywhere!

🚥 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 summarizes the main change—adding a new package specification and build script for broot v1.56.2.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-broot-clean

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

@jtnkminimal jtnkminimal mentioned this pull request May 26, 2026
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.sh`:
- Line 8: build.sh currently runs cargo build --release in the current directory
and ignores the MINIMAL_ARG_VERSION variable; change the script to cd into the
extracted source directory (use the expected directory name that includes
$MINIMAL_ARG_VERSION) before invoking cargo so the build uses the correct
versioned source, i.e., ensure build.sh references $MINIMAL_ARG_VERSION and
performs a cd into that source directory prior to running cargo build --release.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e5eeb0be-2523-46cb-99b2-f6540abf5537

📥 Commits

Reviewing files that changed from the base of the PR and between 2c518d4 and 5378049.

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

Comment thread packages/broot/build.sh
export LD=gcc
export RUSTFLAGS="-C linker=gcc --remap-path-prefix=$(pwd)=/builddir --remap-path-prefix=$HOME/.cargo=/cargo"

cargo build --release
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

Use the forwarded version arg and source-directory navigation in the build step.

The script currently ignores MINIMAL_ARG_VERSION and builds from the current directory directly; this violates the repository’s build script convention and weakens recipe/script contract clarity.

Proposed fix
+version="${MINIMAL_ARG_VERSION:?MINIMAL_ARG_VERSION is required}"
+src_dir="broot-${version}"
+if [[ -d "$src_dir" ]]; then
+  cd "$src_dir"
+fi
+
 cargo build --release

As per coding guidelines, "Use 'cd' to navigate to the extracted source directory and reference the version variable via '$MINIMAL_ARG_VERSION' environment variable in build.sh".

📝 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
cargo build --release
version="${MINIMAL_ARG_VERSION:?MINIMAL_ARG_VERSION is required}"
src_dir="broot-${version}"
if [[ -d "$src_dir" ]]; then
cd "$src_dir"
fi
cargo build --release
🤖 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.sh` at line 8, build.sh currently runs cargo build
--release in the current directory and ignores the MINIMAL_ARG_VERSION variable;
change the script to cd into the extracted source directory (use the expected
directory name that includes $MINIMAL_ARG_VERSION) before invoking cargo so the
build uses the correct versioned source, i.e., ensure build.sh references
$MINIMAL_ARG_VERSION and performs a cd into that source directory prior to
running cargo build --release.

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