Skip to content
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

Swift 6 preview testing #2931

Open
3 of 12 tasks
finestructure opened this issue Mar 9, 2024 · 1 comment
Open
3 of 12 tasks

Swift 6 preview testing #2931

finestructure opened this issue Mar 9, 2024 · 1 comment
Assignees

Comments

@finestructure
Copy link
Member

finestructure commented Mar 9, 2024

This is a tracking issue for Swift 6 preview testing.

The builder changes are in place and deployed. I.e. the current builder is capable of building Swift 6 preview builds. (It does not yet report any results.)

While the basic scaffolding is in place, we're currently blocked from running Swift 6 build via xcodebuild, due to a toolchain bug. The error is

xcodebuild: error: Could not resolve package dependencies:
  Invalid manifest (compiled with: ["/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-02-15-a.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/nk/tlpts6bs799038htr6rx1xnc0000gn/T/TemporaryDirectory.Zb8Hji/vfs.yaml", "-L", "/Applications/Xcode-15.3.0-Beta.3.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode-15.3.0-Beta.3.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-target", "arm64-apple-macos13.0", "-sdk", "/Applications/Xcode-15.3.0-Beta.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk", "-swift-version", "5", "-I", "/Applications/Xcode-15.3.0-Beta.3.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-sdk", "/Applications/Xcode-15.3.0-Beta.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk", "-package-description-version", "5.6.0", "-Xfrontend", "-serialize-diagnostics-path", "-Xfrontend", "/Users/sas/Library/Caches/org.swift.swiftpm/manifests/ManifestLoading/semanticversion.dia", "/Users/sas/Downloads/SemanticVersion/Package.swift", "-disallow-use-new-driver", "-o", "/var/folders/nk/tlpts6bs799038htr6rx1xnc0000gn/T/TemporaryDirectory.BNnpR9/semanticversion-manifest"])
<unknown>:0: warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver'
<unknown>:0: error: unable to execute command: <unknown>

Folks are aware and working on a fix.

  • new toolchain that supports xcodebuild
    • re-enable xcodebuild builder tests PR
  • reporting mechanism of test results
  • merge and tag SPIManifest changes PR
  • server changes
    • Update SPIManifest dependency
    • Update SwiftVersion+Build.swift and adjust to changes
    • Update PackageShow.Model.SwiftVersionResults and adjust to changes
    • Udate SwiftVersion.not in SwiftVersion+BuildResultParameter if needed
    • Merge
    • set BUILD_TRIGGER_LATEST_SWIFT_VERSION_DOWNSCALING to 0.8
    • ⚠️ Deploy when ready
@finestructure finestructure self-assigned this Mar 9, 2024
@finestructure
Copy link
Member Author

finestructure commented Mar 17, 2024

I've started an initial processing run of Swift 6 builds for the two SwiftPM build platforms macOS and Linux we can currently target (because xcodebuild builds crash with the latest nightly toolchain, see above).

I've done this without rolling out any server changes as a first trial pass (and while we wait for a fixed toolchain). This is sending the build results to the dev environment, to avoid any interference with candidate selection for regular builds while the server isn't triggering Swift 6 builds yet.

I'm essentially running the following SQL query to generate trigger commands for manual builds:

-- generate "Run" commands for missing Swift 6 builds
select 'sleep 4 ; ./Run trigger-builds -s 6.0 -v ' || t.id || ' -p ' || t.platform || ' ; echo triggered job ' || row_number() over (order by random())
from (
	select v.id, 'macos-spm' as "platform"
	from versions v
	where v.latest = 'default_branch'
	and v.id not in (
		select v.id
		from builds b
		join versions v on b.version_id = v.id
		where swift_version->>'major' = '6'
		and platform = 'macos-spm'
	)
	union
	select v.id, 'linux' as "platform"
	from versions v
	where v.latest = 'default_branch'
	and v.id not in (
		select v.id
		from builds b
		join versions v on b.version_id = v.id
		where swift_version->>'major' = '6'
		and platform = 'linux'
	)
) t;

NB: run SQL and trigger commands on the dev environment.

This can be re-run to generate trigger commands for any missing builds. This query will eventually return no rows when we've triggered all missing builds.

I'm running the builds in chunks of 1000 for now. (We have 14,300 Swift 6 build candidates with just two platforms.)

We can show/collect results and monitor progress via

-- show Swift 6 build results
select v.package_name, status, platform, build_errors->>'numSwift6Errors' swif6_errors, job_url
from builds b
join versions v on b.version_id = v.id
where swift_version->>'major' = '6'

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

No branches or pull requests

1 participant