Skip to content

Fix linux-packages job after iter-32 crate move#39

Merged
ractive merged 1 commit into
mainfrom
iter-32c/fix-deb-rpm-asset-paths
May 10, 2026
Merged

Fix linux-packages job after iter-32 crate move#39
ractive merged 1 commit into
mainfrom
iter-32c/fix-deb-rpm-asset-paths

Conversation

@ractive

@ractive ractive commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

The v0.3.0 release run failed at the linux-packages job:

```
error: Can't resolve asset: crates/hoppy-cli/completions/hoppy.bash -> usr/share/bash-completion/completions/hoppy
cause: Static file asset path did not match any existing files: /home/runner/work/hoppy/hoppy/crates/hoppy-cli/completions/hoppy.bash
```

Root cause: `cargo-deb` and `cargo-generate-rpm` resolve relative asset paths from the package directory (`crates/hoppy-cli/`), but iter-32's release.yml still generated completions and man pages at the workspace root, where the package metadata couldn't find them.

Fixes

  • `.github/workflows/release.yml` (linux-packages job) — generate completions into `crates/hoppy-cli/completions/` and man pages into `crates/hoppy-cli/man/` so the asset paths in `crates/hoppy-cli/Cargo.toml` resolve.
  • `crates/hoppy-cli/Cargo.toml` — LICENSE and README.md live at the workspace root and aren't regenerated per-build. Reference them as `../../LICENSE` and `../../README.md` so cargo-deb / cargo-generate-rpm pick them up without an extra copy step.

The two main-matrix completion/man-generation steps in the `build` job (used for tar.gz archives) are left alone — they correctly generate at the workspace root because the archive packaging step expects them there.

Test plan

  • Local `cargo deb -p hoppy-cli --no-build --no-strip` succeeds (verified on macOS; `dpkg-shlibdeps` warning is host-OS-specific and doesn't apply on the Linux CI runner)
  • `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace --quiet` clean
  • CI green on this PR
  • After merge: re-cut the v0.3.0 release (delete tag, re-tag at the merge commit, re-create the GitHub release) and confirm linux-packages succeeds

🤖 Generated with Claude Code

cargo-deb and cargo-generate-rpm resolve relative asset paths from the
package directory (crates/hoppy-cli/), not the workspace root. After
iter-32 moved the binary into crates/hoppy-cli/, the linux-packages job
in release.yml still generated completions and man pages at the
workspace root, so cargo-deb failed to find them:

  error: Can't resolve asset: crates/hoppy-cli/completions/hoppy.bash

Fixes:
- release.yml: generate completions into crates/hoppy-cli/completions/
  and man pages into crates/hoppy-cli/man/ so cargo-deb finds them where
  the asset paths point.
- crates/hoppy-cli/Cargo.toml: LICENSE and README.md live at the
  workspace root and aren't generated per-build; use ../../LICENSE and
  ../../README.md so cargo-deb / cargo-generate-rpm pick them up
  without copying.

Verified locally with `cargo deb -p hoppy-cli --no-build --no-strip`:
package builds successfully (the dpkg-shlibdeps warning is macOS-only
and doesn't apply on the Linux CI runner).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 10, 2026 22:14
@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@ractive has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 47 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4183fd5f-2b4f-4a28-bb37-f6f42704f527

📥 Commits

Reviewing files that changed from the base of the PR and between 93daf04 and 2f84748.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • crates/hoppy-cli/Cargo.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch iter-32c/fix-deb-rpm-asset-paths

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 and usage tips.

Copilot AI 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.

Pull request overview

Fixes the linux-packages release workflow after the iter-32 move of the CLI crate by aligning generated artifact locations (shell completions + man pages) and package metadata asset paths with how cargo-deb / cargo-generate-rpm resolve relative paths for workspace members.

Changes:

  • Update linux-packages in release.yml to generate shell completions and man pages under crates/hoppy-cli/ so packaging asset paths resolve correctly.
  • Adjust .deb and .rpm asset entries in crates/hoppy-cli/Cargo.toml to reference the workspace-root LICENSE and README.md via ../../….

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/hoppy-cli/Cargo.toml Updates deb/rpm asset source paths for LICENSE/README to point at workspace-root files.
.github/workflows/release.yml Fixes linux-packages by generating completions/man pages into crates/hoppy-cli/ where packaging expects them.

@ractive
ractive merged commit cc8d5a9 into main May 10, 2026
11 checks passed
@ractive
ractive deleted the iter-32c/fix-deb-rpm-asset-paths branch May 10, 2026 22:20
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