Skip to content

Commit dd57c44

Browse files
committed
ci: 克隆带过来的 workspace pin 指向索引里已经没有的版本
xlings: version '2026.8.17.1' not found for 'mcpp' available: 2026.8.19.4 仓库根的 .xlings.json 决定那棵树里的构建用哪个 mcpp,而 mcpp 自己的 bootstrap pin 不随发布移动 —— 它是上次动这个文件时的当前版本。把分支克隆过来,就把一个 只在那个仓库自己的 CI 里成立的 pin 一起带了过来。 改写成本 job 已经装好的那个版本,两边就一致了。它不改变被测的东西:pin 选的是 **构建 mcpp 的**工具,而被测的是构建出来的那个 mcpp。
1 parent dae6a84 commit dd57c44

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,24 @@ jobs:
131131
git clone --depth 1 -b feat/import-std-capability \
132132
https://github.com/mcpp-community/mcpp "$RUNNER_TEMP/mcpp-src"
133133
cd "$RUNNER_TEMP/mcpp-src"
134+
# ⚠️ THE CLONE CARRIES A WORKSPACE PIN, AND IT NAMES A VERSION THE
135+
# INDEX NO LONGER HAS.
136+
#
137+
# xlings: version '2026.8.17.1' not found for 'mcpp'
138+
# available: 2026.8.19.4
139+
#
140+
# `.xlings.json` at a repository root says which mcpp a build in that
141+
# tree uses, and mcpp's own bootstrap pin does not move when mcpp is
142+
# released — it is the version that was current when the pin was last
143+
# touched. Cloning the branch therefore imports a pin that is only
144+
# valid inside that repository's own CI, where the same file selects
145+
# what gets installed.
146+
#
147+
# Rewriting it to the version this job already installed is what makes
148+
# the two agree. It changes nothing about what is being tested: the
149+
# pin selects the tool that BUILDS mcpp, and what is under test is the
150+
# mcpp that comes out.
151+
printf '{\n "workspace": {\n "mcpp": "%s"\n }\n}\n' "$MCPP_VERSION" > .xlings.json
134152
mcpp build --release
135153
BUILT=$(find target -type f -name mcpp -perm -u+x | head -1)
136154
[ -n "$BUILT" ] || { echo "::error::mcpp did not build"; exit 1; }

0 commit comments

Comments
 (0)