Repository navigation
lib_deps: install GitHub /tree/<ref> and archive URLs; keep ref-less installs pinned - #2067
Merged
Merged
Conversation
…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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_librariescallsenv_lm.install(spec)for eachlib_depsentry.platformio/package/manager/_install.pyinstall()returns early with "is already installed" whenget_package(spec)finds the package. Onlypio 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 cleanorfbuild build --clean, which removes the build dir and itslibs/. Pinning a#<ref>and changing it also works, because the ref is part of the install directory. This is documented indocs/sync.mdand the module docs. A test confirms that an installed ref-less dependency is reused with no network call.Item 4: URL shapes
https://github.com/O/R/tree/<ref>(also/in the ref, a trailing/,http://,www.)archive/<ref>.ziphttps://github.com/O/R/archive/<ref>.ziphttps://github.com/O/R/archive/refs/tags/<t>.zip,refs/heads/<b>.ziphttps://github.com/O/R/archive/<ref>.tar.gzarchive/<ref>.zip/blob/...,/releases/download/...,/tree/with no ref,..segments, a#or?after/tree/or/archive/)git+https://...,*.git, gitlab.com, bitbucket)https://example.com/lib.zip)What PlatformIO does with these: it runs
git cloneon/tree/<ref>URLs, which fails (git ls-remote https://github.com/FastLED/FastLED/tree/3.10.3reports "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
soldr cargo test -p fbuild-library -p fbuild-configpasses. Clippy-D warningsand dylint (fbuild-library) are clean.FBUILD_DEV_MODE=1: built an AVRunoblink withlib_deps = https://github.com/FastLED/FastLED/tree/3.10.3. It installedlibs/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.