I’m trying to build a website from a PR, specifically this one: Switching to Saga by kevinrenskers · Pull Request #2 · loopwerk/loopwerk.io · GitHub. This is a Swift project that also depends on some Python packages. The problem is that this Swift package depends on another package, to a specific branch. And Netlify keeps checking out an older commit, not the latest commit of that branch.
This is my Package.swift:
// swift-tools-version:5.2 import PackageDescription let package = Package( name: "Loopwerk", dependencies: [ .package(name: "Saga", url: "https://github.com/loopwerk/Saga.git", .branch("SwiftMarkdown")), ], targets: [ .target( name: "Loopwerk", dependencies: ["Saga"]), ] )
When you look at https://github.com/loopwerk/Saga/commits/SwiftMarkdown, you can see that the latest commit has hash
192753e9475bff3ead679c83883f57ef3087ce5f. Yet in the build log this error keeps happening:
9:54:46 PM: 5.2 has been installed. 9:54:46 PM: Using Swift version 5.2 9:54:46 PM: Building Swift Package 9:54:46 PM: Started restoring cached swift build 9:54:46 PM: Finished restoring cached swift build 9:54:48 PM: Fetching https://github.com/loopwerk/Saga.git 9:54:49 PM: https://github.com/loopwerk/Saga.git @ 99ae70723ac84ed96291f36e659e554ba5a0ed40: error: package at 'https://github.com/loopwerk/Saga.git' @ 99ae70723ac84ed96291f36e659e554ba5a0ed40 is using Swift tools version 5.3.0 but the installed version is 5.2.0 9:54:49 PM: Error building Swift package
Even when I re-run the build with the clean cache option, it keeps restoring the cached Swift build, and keeps using that