@@ -397,33 +397,6 @@ function prep {
397397 pull_submodules
398398}
399399
400- # Fail loudly if the build left any committed yarn.lock rewritten.
401- #
402- # A submodule or dependency bump that changes resolved versions but forgets to
403- # regenerate the lockfile would otherwise drift silently: the build runs
404- # `yarn install`, which rewrites the lockfile in the container and proceeds, so
405- # nothing fails even though the committed lockfile is stale. The node-modules
406- # cache_content_hash includes yarn.lock, but it is computed at install *start*,
407- # so a rewrite during the build is never re-checked. This gate runs after the
408- # build and turns such a desync (e.g. a noir-repo bump that forgot
409- # yarn-project/yarn.lock) into a hard CI failure.
410- function check_lockfiles {
411- echo_header " lockfile drift check"
412- local drifted
413- drifted=$( git diff --name-only | grep -E ' (^|/)yarn\.lock$' || true)
414- if [ -n " $drifted " ]; then
415- echo_stderr " ERROR: committed yarn.lock(s) were rewritten by the build:"
416- echo_stderr " $drifted "
417- git --no-pager diff -- $drifted >&2
418- echo_stderr " "
419- echo_stderr " A dependency or submodule bump changed resolved versions without committing the"
420- echo_stderr " updated lockfile (e.g. a noir-repo bump that forgot yarn-project/yarn.lock)."
421- echo_stderr " Regenerate and commit it: cd <project> && yarn install, then commit yarn.lock."
422- exit 1
423- fi
424- echo " No lockfile drift detected."
425- }
426-
427400function build {
428401 prep
429402 echo_header " build"
@@ -771,22 +744,19 @@ case "$cmd" in
771744 export USE_TEST_CACHE=1
772745 export CI_FULL=0
773746 build_and_test fast
774- check_lockfiles
775747 ;;
776748 " ci-full" )
777749 export CI=1
778750 export USE_TEST_CACHE=1
779751 export CI_FULL=1
780752 build_and_test full
781- check_lockfiles
782753 bench
783754 ;;
784755 " ci-full-no-test-cache" )
785756 export CI=1
786757 export USE_TEST_CACHE=0
787758 export CI_FULL=1
788759 build_and_test full
789- check_lockfiles
790760 bench
791761 ;;
792762 " ci-chonk-input-update" )
0 commit comments