WIP: [30.x] Backports

bitcoin/bitcoin: PR #36929

1 minor finding

Findings

Link

[minor] · Windows CI retains -Werror=dev despite upstream removal

Both Windows CI jobs retain the pre-existing -Werror=dev, so CMake developer warnings still abort configuration despite this backport; failure on the current runner image is unconfirmed.

Location: ci/test/03_test_script.sh:127 (head).

Details and suggested fix

Upstream 3d92fe8bbdf8c0b5e14ad824c792c53a697137a7 removes -Werror=dev from .github/ci-windows.py as well as the two scripts changed here. On 30.x, the Windows equivalent lives inline in .github/workflows/ci.yml: its Generate build system step still passes the flag for both the standard and fuzz jobs. These jobs use the runner's unpinned CMake, and the vs2022 preset does not override developer warnings. Consequently, when that CMake emits the warnings motivating #36927, Windows configuration remains fatal while the other CI paths receive the fix. Remove -Werror=dev from this workflow command in 9006b9cb1696957659c0cd418805de5a8fb7e242, and note that it adapts the upstream Windows hunk to 30.x's inline workflow.


Backport verdict: Incomplete

This backport is incomplete. Three of the four upstream commits match their originals, but one adaptation is missing. Upstream commit 3d92fe8bbd removed -Werror=dev from the native Windows CI configure step in .github/ci-windows.py. That file doesn't exist on 30.x, where the same step is inline at .github/workflows/ci.yml:234 (cmake -B build -Werror=dev --preset vs2022 ...). The backport dropped the hunk and did not port it to ci.yml. Neither the PR nor the commit message gives a reason for leaving it out. As a result, the 30.x Windows job still turns CMake dev warnings into errors. That is the failure #36927 says it addresses: the PR names the Windows job as one affected once a newer CMake is used, and says the branches fail to configure with CMake >= 4.5.0. The other changes match upstream: the dev-mode preset change, the ci-test-each-commit-exec.py and 03_test_script.sh changes, the depends WORK_PATH relocation, and the release notes.

Evidence:

Required fixes:

Limitations:

Coverage details

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

Local packages were introduced to build dependency sources already present in the checkout, while retaining depends' package identity and rebuild machinery. The original documentation explicitly describes treating a local directory as a download source, saving its tarball in sources/, including its checksum in the package build ID, and caching the tarball for efficiency.

This explains the archive and checksum stamp as adapters into the existing depends pipeline, rather than independently distributed source artifacts. The immediate use was the libmultiprocess subtree, whose native code generator still needed a depends build during cross-compilation. Relocating these artifacts changes their storage domain, not that underlying purpose.

Source 1 · Source 2

The inspected historical explanation does not present cross-checkout sharing as an intentional reason for putting local archives in SOURCES_PATH. A subsequent implementation discussion explicitly says shared SOURCES_PATH usage was not considered when the feature was introduced.

The historical record therefore does not establish preservation of shared local snapshots as a design requirement. It distinguishes the intentional sharing of downloaded sources from the unintended reuse of checkout-generated archives. This bears directly on the change from SOURCES_PATH to WORK_PATH/local-sources.

Source 1 · Source 2 · Source 3

The mtime-based cache was deliberately kept inexpensive because archive checking occurs while parsing the makefiles—even for variable-printing commands. The discussion separates cross-checkout isolation from stronger content-based invalidation, and records concern about repeatedly processing potentially larger local source trees.

The pinned change retains the existing refresh mechanism while moving both archive and fetched stamp together. Historical reasoning supports treating cache location and invalidation policy as separate questions; it does not establish that a new location alone addresses every source-identity concern.

Source 1 · Source 2

Ralph's inferences

The original SOURCES_PATH placement appears to have been inherited from the common download-source machinery, including its fetched-stamp location, rather than introduced as a separate local-package handoff protocol.

The introduction added local archive generation while retaining the existing source-directory assignment. At the pinned base, archives and fetched stamps both use SOURCES_PATH; at the head, both follow the selected package source directory. This explains their original colocation without inventing an explicit historical requirement to share them.

Source 1

Guix's outer download/build contract explicitly requires downloaded sources to cross the phase boundary because the build container has no network access. It also supplies the complete checkout at /bitcoin, so the inspected orchestration does not establish an equivalent requirement to transport pre-generated local archives through SOURCES_PATH.

The script downloads dependencies before entering the container, shares an overridden SOURCES_PATH, and separately mounts the checkout. Local archive generation can operate from checkout contents at makefile parse time. This supports distinguishing network-fetched inputs from locally regenerable snapshots, but the uninspected inner build phase prevents a complete compatibility conclusion.

WORK_PATH is checkout-local by default, not inherently private under every override. The inspected Guix wrapper does not expose it as a preserved or explicitly forwarded cross-phase cache setting.

The makefile assigns WORK_PATH to depends/work and already uses it for build, staging, and temporary download directories. A command-line override can change that location, including making it shared; the relocation therefore provides default isolation rather than unconditional isolation. Guix's explicit preserved-directory and container-variable lists include SOURCES_PATH, BASE_CACHE, and SDK_PATH, but not WORK_PATH.