-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Sever TSC/Driver dependencies if using SwiftBuild Framework #8442
base: main
Are you sure you want to change the base?
Sever TSC/Driver dependencies if using SwiftBuild Framework #8442
Conversation
f22279f
to
37c4690
Compare
Updated PR title to be more readable, as the previous "the package dependency" qualifier did not make it clear at a glance which exact dependencies are gone. |
Package.swift
Outdated
@@ -87,6 +87,26 @@ if ProcessInfo.processInfo.environment["SWIFTCI_INSTALL_RPATH_OS"] == "android" | |||
*/ | |||
let autoProducts = [swiftPMProduct, swiftPMDataModelProduct] | |||
|
|||
let shouldUseSwiftBuildPackageDependency = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chore (blocking): Need to ensure this does not produce #8437 (comment)
Building SwiftPM with
swift build
, usingSWIFTPM_NO_SWBUILD_DEPENDENCY=1
andSWIFTCI_USE_LOCAL_DEPS=1
.../swiftpm/Sources/Basics/Archiver/TarArchiver.swift:15:15: error: no such module 'TSCBasic'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drodriguez : Could you please try this change to ensure it does not break your workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the builds for people that chosen to use SWIFTPM_NO_SWBUILD_DEPENDENCY
and avoid swift-build. After this change it seems that the swift-build dependency is required. Is that one of the intents of the change? The summary seems to talk about changing things when the swift-build framework is used, but nothing about requiring swift-build for every build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SwiftBuild is intended to be made available via the --build-system swiftbuild
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since #8373 was merged, SWIFTPM_NO_SWBUILD_DEPENDENCY
is no longer required.
37c4690
to
a610518
Compare
@swift-ci test |
a610518
to
0a51cce
Compare
…ework" (…" This reverts commit e64232e, with some changes
0a51cce
to
44135cc
Compare
@swift-ci please test |
@swift-ci please test self hosted windows |
@@ -1050,8 +1063,7 @@ if ProcessInfo.processInfo.environment["ENABLE_APPLE_PRODUCT_TYPES"] == "1" { | |||
} | |||
} | |||
|
|||
if ProcessInfo.processInfo.environment["SWIFTPM_SWBUILD_FRAMEWORK"] == nil && | |||
ProcessInfo.processInfo.environment["SWIFTPM_NO_SWBUILD_DEPENDENCY"] == nil { | |||
if !shoudUseSwiftBuildFramework { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recovering && ProcessInfo.processInfo.environment["SWIFTPM_NO_SWBUILD_DEPENDENCY"] == nil
seems to allow the previous behaviour of disabling swift-build completely from SwiftPM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SWIFTPM_NO_SWBUILD_DEPENDENCY
was a temporary workaround until we were able to properly integrate SwiftBuild in the toolchain build. I don't believe it's required anymore since #8373 was merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unfortunate. It was really helpful for workflows that did not want to use SwiftBuild just yet until all the dust settled. The SwiftPM code seems prepared to work without it, and as the small modification proves, it doesn't seem really necessary for SPM to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That code should be dormant until we make it the default build system and that will likely take quite a while yet.
@swift-ci test windows |
@swift-ci test self hosted windows |
The SwiftBuild project has a dependency on Swift Driver, which has a dependency on Swift Tools Support Core (STSC). Swift Package Manager (SwiftPM) executable targets also have a dependency on STSC.
Sever SwiftPM package dependency on STSC if the
SWIFTPM_SWBUILD_FRAMEWORK
environment variable is set so we can indirectly pull the STCS dependency on the dynamic library that will be pulled in via SwiftDriver.Reverts #8437