Skip to content

[5.6] Update package dependencies to use the 'release/5.6' branch #929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

abertelrud
Copy link

@abertelrud abertelrud commented Dec 8, 2021

Update swift-llbuild and swift-tools-support-core dependencies to use the 'release/5.6' branch instead of main. This is needed before we can switch over SwiftPM to depend on 'release/5.6'.

@abertelrud
Copy link
Author

@swift-ci please smoke test

@abertelrud abertelrud requested a review from nkcsgexi December 8, 2021 16:27
@abertelrud abertelrud changed the title Update swift-llbuild and swift-tools-support-core dependencies to use the 'release/5.6' branch [5.6] Update package dependencies to use the 'release/5.6' branch Dec 8, 2021
@@ -121,7 +121,7 @@ let package = Package(
if ProcessInfo.processInfo.environment["SWIFT_DRIVER_LLBUILD_FWK"] == nil {
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies += [
.package(url: "https://github.com/apple/swift-llbuild.git", .branch("main")),
.package(url: "https://github.com/apple/swift-llbuild.git", .branch("release/5.6")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it work better to refactor this as a let binding reused for both Driver and TSC dependencies, to be consistent with Package.swift in the SwiftPM repo?

Copy link
Author

@abertelrud abertelrud Dec 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. I'll let the driver folks decide. I wanted to do the minimal change in this case. If so, it's probably better to do the change in main as well to minimize differences between the branches.

@MaxDesiatov
Copy link
Contributor

@swift-ci please test

@MaxDesiatov
Copy link
Contributor

Not sure if builds for release/5.6 are set up correctly? It fails because corresponding URL on swift.org doesn't exist:

17:56:36 + echo+ sed s/-ubuntu16.04.tar.gz//g
17:56:36 
17:56:36 + DOWNLOAD_DIR=
17:56:36 + /usr/bin/curl https://download.swift.org/swift-5.6-branch/ubuntu1604//

@artemcm
Copy link
Contributor

artemcm commented Dec 8, 2021

Not sure if builds for release/5.6 are set up correctly? It fails because corresponding URL on swift.org doesn't exist:

17:56:36 + echo+ sed s/-ubuntu16.04.tar.gz//g
17:56:36 
17:56:36 + DOWNLOAD_DIR=
17:56:36 + /usr/bin/curl https://download.swift.org/swift-5.6-branch/ubuntu1604//

cc @shahmishal

@abertelrud
Copy link
Author

abertelrud commented Dec 8, 2021

We might not have the first nightly 5.6 toolchain yet. I don't see one on the swift.org Downloads web page.

@shahmishal
Copy link
Member

Correct, we are not ready yet.

@benlangmuir
Copy link
Contributor

@ahoppen we'll need a sourcekit-lsp change to match this. It won't be caught by CI, because CI uses the local checkout of swift-driver instead of the branch dependency.

@abertelrud
Copy link
Author

@swift-ci please test

@abertelrud
Copy link
Author

Still don't have a 5.6 toolchain it seems.

@MaxDesiatov
Copy link
Contributor

Yeah, I'm checking the list of toolchains here https://www.swift.org/download/, and 5.6 is not in the list yet.

@abertelrud
Copy link
Author

It looks like @swift-ci please test is actually doing a smoke test, unless I'm reading the log wrong (I see sh swift-ci/jobs/pull-request/pr-swift-driver-smoke.sh). In SwiftPM, the 5.6 release branch tests are full tests, so it doesn't seem to have to download a toolchain.

@abertelrud
Copy link
Author

Running a cross-repo test in swiftlang/swift#40613 to avoid the need for a 5.6 toolchain.

@abertelrud
Copy link
Author

So swiftlang/swift#40613 seems to have passed, except for what looks like an unrelated issue with Windows that I have asked @compnerd about. @artemcm what successful tests in swiftlang/swift#40613 would be require in order to be able to merge this?

@abertelrud
Copy link
Author

Also, why is @swift-ci test appear to be configured the same as @swift-ci smoke test in this repo? This seems to leave no way to do a full build, as we can in the swiftpm repo to get around the lack of an available 5.6 toolchain.

@abertelrud
Copy link
Author

Looks like the smoke tests for all three platforms in swiftlang/swift#40613 have passed now, so should that be considered equivalent testing to what we would have had if we'd had a downloadable 5.6 toolchain?

@abertelrud
Copy link
Author

@artemcm @nkcsgexi @benlangmuir @shahmishal Is this something we can merge based on the successful cross-repo test in swiftlang/swift#40613?

@ahoppen
Copy link
Member

ahoppen commented Dec 21, 2021

I don’t think the cross-PR test actually covers the change. AFAICT the test invocation ran

/Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/swift-driver/Utilities/build-script-helper.py build --package-path /Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/swift-driver --build-path /Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/buildbot_incremental/earlyswiftdriver-macosx-x86_64 --configuration release --toolchain /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --ninja-bin /Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/buildbot_incremental/ninja-build/ninja --cmake-bin /usr/local/bin/cmake --local_compiler_build --verbose

which doesn’t have --no-local-deps, so it’s setting the SWIFTCI_USE_LOCAL_DEPS environment variable and thus resolving the dependencies using locally checked-out sibling repositories instead of the branch names that were changed in this PR.

FWIW I don’t have any objections to merging this if a local build with --no-local-deps passes.

@abertelrud
Copy link
Author

abertelrud commented Dec 21, 2021

I don’t think the cross-PR test actually covers the change. AFAICT the test invocation ran

/Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/swift-driver/Utilities/build-script-helper.py build --package-path /Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/swift-driver --build-path /Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/buildbot_incremental/earlyswiftdriver-macosx-x86_64 --configuration release --toolchain /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --ninja-bin /Users/buildnode/jenkins/workspace/swift-PR-macos-smoke-test/branch-release/5.6/buildbot_incremental/ninja-build/ninja --cmake-bin /usr/local/bin/cmake --local_compiler_build --verbose

which doesn’t have --no-local-deps, so it’s setting the SWIFTCI_USE_LOCAL_DEPS environment variable and thus resolving the dependencies using locally checked-out sibling repositories instead of the branch names that were changed in this PR.

Interesting, I missed that part! Thanks for noticing that it wasn't a proper test.

FWIW I don’t have any objections to merging this if a local build with --no-local-deps passes.

We might not be able to merge it from a technical perspective since this PR has to have green checks (though I'm sure someone can override it if we really wanted to).

It seems odd that @swift-ci test does just a smoke test for this repo. In SwiftPM we got around the lack of a downloadable toolchain by doing @swift-ci test to build the whole stack (you can still do @swift-ci please smoke test if you really wanted a smoke test). That would have been useful here.

@artemcm
Copy link
Contributor

artemcm commented Jan 4, 2022

I tried out this PR locally building/testing with SPM directly and by using build-script-helper.py with and without --no-local-deps, and all looks good on my end.

We should force-merge this to unblock SwiftPM testing, while we figure out the downloadable 5.6 toolchain situation.

@tomerd tomerd merged commit a49908d into release/5.6 Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants