Skip to content

lib_deps: install GitHub /tree/<ref> and archive URLs; keep ref-less installs pinned - #2067

Merged
zackees merged 1 commit into
mainfrom
fix/libdeps-github-followups-2042
Nov 17, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/libdeps-github-followups-2042

Conversation

@zackees

@zackees zackees commented Nov 17, 2026

Copy link
Copy Markdown
Member

Part of #2042 (lib_deps group, items 3 and 4).

Item 3: a ref-less GitHub URL never refreshes

Decision: keep it pinned and document the refresh path (option b).

PlatformIO 6.1.18 does the same. platformio/package/commands/install.py _install_project_env_libraries calls env_lm.install(spec) for each lib_deps entry. platformio/package/manager/_install.py install() returns early with "is already installed" when get_package(spec) finds the package. Only pio pkg update (_update.py, _fetch_vcs_latest_version) asks the remote for a newer revision. Option (a) would add a network round trip, or a TTL cache, to no-op builds, and builds would stop being reproducible.

The refresh path is fbuild clean or fbuild build --clean, which removes the build dir and its libs/. Pinning a #<ref> and changing it also works, because the ref is part of the install directory. This is documented in docs/sync.md and the module docs. A test confirms that an installed ref-less dependency is reused with no network call.

Item 4: URL shapes

Shape Before Now
https://github.com/O/R/tree/<ref> (also / in the ref, a trailing /, http://, www.) skipped with a warning installs archive/<ref>.zip
https://github.com/O/R/archive/<ref>.zip skipped installs that archive
https://github.com/O/R/archive/refs/tags/<t>.zip, refs/heads/<b>.zip skipped installs that archive (same URL)
https://github.com/O/R/archive/<ref>.tar.gz skipped installs archive/<ref>.zip
Malformed GitHub URLs (/blob/..., /releases/download/..., /tree/ with no ref, .. segments, a # or ? after /tree/ or /archive/) skipped, "unparseable" skipped; the warning lists the accepted GitHub forms
Non-GitHub git (git+https://..., *.git, gitlab.com, bitbucket) skipped, "unparseable" skipped; the warning says it would need a git clone, which fbuild does not do
Non-GitHub archive URL (https://example.com/lib.zip) skipped, "unparseable" skipped; the warning says it is not supported

What PlatformIO does with these: it runs git clone on /tree/<ref> URLs, which fails (git ls-remote https://github.com/FastLED/FastLED/tree/3.10.3 reports "repository not found"). It downloads archive URLs as plain files, and clones other git hosts with git. Supporting other git hosts would mean taking on a git dependency, or per-host archive endpoints, so this PR leaves them out and keeps the warning.

Validation

  • RED first: 4 new parsing tests failed before the change. soldr cargo test -p fbuild-library -p fbuild-config passes. Clippy -D warnings and dylint (fbuild-library) are clean.
  • E2E with FBUILD_DEV_MODE=1: built an AVR uno blink with lib_deps = https://github.com/FastLED/FastLED/tree/3.10.3. It installed libs/fastled-3.10.3 (FASTLED_VERSION 3010003) and the build succeeded (3784 B flash, 152 B RAM). A second build was a 0.1 s no-op.

…pinned installs

Part of #2042 (lib_deps group).

Item 4: GitHub's web URL of a ref (`.../tree/<ref>`) and direct archive
URLs (`.../archive/<ref>.zip`, `.../archive/refs/tags/<t>.zip`, `.tar.gz`)
now install GitHub's archive of that ref, the same as `#<ref>`. Non-GitHub
git hosts and non-GitHub archive URLs stay skipped, but the warning now
says why (no git clone / no generic archive download) instead of
"unparseable".

Item 3: keep a ref-less GitHub URL pinned to its first download, matching
PlatformIO (`pio run` installs only missing packages; updates happen on
`pio pkg update`). No network call on no-op builds. `fbuild clean` /
`--clean` refreshes it. Documented in docs/sync.md and covered by a test.
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@zackees
zackees added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit ddf4def Nov 17, 2026
31 checks passed
@zackees
zackees deleted the fix/libdeps-github-followups-2042 branch November 17, 2026 22:58
zackees added a commit that referenced this pull request Nov 18, 2026
Brings #2051 (reroot relative spelling), #2057 (rp2040 large future),
#2058 (respell has_root / native tool spelling / renesas OnceCell), #2059
(bench framework + tracing feature) and #2063/#2067. Only conflict was
fbuild-toolchain esp32.rs test fixture, resolved to main's #2058 native-spelling
semantics (explicit native_name let-binding).
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant