bazel-contrib / bazel-contrib/multitool

multitool can't find some github releases (clang, sleek)

Open
#123 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
6
Forks
2
PR merge metrics
No merged PRs in 30d

Description

file exists, both tools work as expected with rules_multitool, but upgrading them produces the following 404's:

```json
"clang-format": {
"binaries": [
{
"kind": "archive",
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-arm64-apple-macos11.tar.xz",
"file": "clang+llvm-18.1.8-arm64-apple-macos11/bin/clang-format",
"sha256": "4573b7f25f46d2a9c8882993f091c52f416c83271db6f5b213c93f0bd0346a10",
"os": "macos",
"cpu": "arm64",
"type": "tar.xz"
}
]
},
```

```bash
➜ bazel-os git:(main) ✗ RUST_BACKTRACE=m bazel run @multitool//tools/multitool:cwd -- --lockfile multitool.lock.json update
INFO: Analyzed target @@rules_multitool++multitool+multitool//tools/multitool:cwd (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target @@rules_multitool++multitool+multitool//tools/multitool:cwd up-to-date:
bazel-bin/external/rules_multitool++multitool+multitool/tools/multitool/cwd
INFO: Elapsed time: 0.117s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/external/rules_multitool++multitool+multitool/tools/multitool/cwd
^C%
➜ bazel-os git:(main) ✗
➜ bazel-os git:(main) ✗ RUST_BACKTRACE=1 bazel run @multitool//tools/multitool:cwd -- --lockfile multitool.lock.json update
INFO: Analyzed target @@rules_multitool++multitool+multitool//tools/multitool:cwd (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target @@rules_multitool++multitool+multitool//tools/multitool:cwd up-to-date:
bazel-bin/external/rules_multitool++multitool+multitool/tools/multitool/cwd
INFO: Elapsed time: 0.113s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/external/rules_multitool++multitool+multitool/tools/multitool/cwd
Encountered error while attempting to update clang-format: HTTP status client error (404 Not Found) for url (https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/clang+llvm-18.1.8-arm64-apple-macos11.tar.xz)
thread 'main' panicked at src/main.rs:120:28:
Failed to find tag_name in response:
===
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#get-the-latest-release","status":"404"}
===

stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: multitool::update_github_release
3: as core::iter::traits::iterator::Iterator>::try_fold
4: alloc::vec::in_place_collect::from_iter_in_place
5: core::ops::function::impls:: for &mut F>::call_once
6: as alloc::vec::spec_from_iter::SpecFromIter>::from_iter
7: as core::iter::traits::collect::FromIterator<(K,V)>>::from_iter
8: multitool::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the documented Bazel command and multitool.lock.json. Inspect src/main.rs around line 120 and the update_github_release path, using the clang-format 404 and panic as the starting case. Done means the affected GitHub releases, including clang-format and sleek, can be updated without a 404-related panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.