Skip to content

Commit de94693

Browse files
committed
Enforce resolved versions in bootstrap
During bootstrap, we should only be using local dependencies and therefore never be in the position to write a resolved file.
1 parent 50fc7f2 commit de94693

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Utilities/bootstrap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,12 @@ def build_swiftpm_with_swiftpm(args, integrated_swift_driver):
593593

594594
swiftpm_args.append("--disable-sandbox")
595595

596+
# Enforce resolved versions to avoid stray dependencies that aren't local.
597+
swiftpm_args.append("--force-resolved-versions")
598+
# Any leftover resolved file from a run without `SWIFTCI_USE_LOCAL_DEPS` needs to be deleted.
599+
if os.path.exists("Package.resolved"):
600+
os.remove("Package.resolved")
601+
596602
if integrated_swift_driver:
597603
swiftpm_args.append("--use-integrated-swift-driver")
598604

0 commit comments

Comments
 (0)