Skip to content

[shims] Remove some obsolete shims modules #37600

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
Jul 1, 2021

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented May 22, 2021

The corresponding overlays are maintained outside of this repository, and they haven’t been importing these shims for years.

SDKs that shipped between Xcode 10.2 and Xcode 11 (or so) contained overlay modules that imported these shims modules, so future toolchain builds won’t work correctly with those SDKs. (This is fine! We do not expect toolchain builds to work with years old Xcode installations anyway.)

The shims that remain are used either by stdlib components, or by one of the overlays that still exist in the repository (ObjectiveC, Darwin, CoreGraphics, CoreFoundation, Foundation).

@lorentey lorentey requested a review from edymtt May 22, 2021 00:43
@lorentey
Copy link
Member Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 928882698a4d7669688c22246459f05a8945924e

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 928882698a4d7669688c22246459f05a8945924e

@lorentey
Copy link
Member Author

19:31:51 
/Users/buildnode/jenkins/workspace/swift-PR-macos/branch-main/swift/stdlib/public/Darwin/XCTest/XCTest.swift:27:29: error: no such module '_SwiftXCTestOverlayShims'
19:31:51 @_implementationOnly import _SwiftXCTestOverlayShims
19:31:51                             ^

Oh yeah, this depends on #37587.

@lorentey
Copy link
Member Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 928882698a4d7669688c22246459f05a8945924e

@lorentey
Copy link
Member Author

01:16:33 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/XCTest.swiftmodule/x86_64-apple-macos.swiftinterface:8:8: error: no such module '_SwiftXCTestOverlayShims'
01:16:33 import _SwiftXCTestOverlayShims
01:16:33        ^
01:16:33 /Users/buildnode/jenkins/workspace/swift-PR-macos/branch-main/swiftpm/Sources/swiftpm-xctest-helper/main.swift:12:8: error: failed to build module 'XCTest'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)', while this compiler is 'Apple Swift version 5.5-dev (LLVM ad98975a96ba709, Swift 7d5e3f1882a6c05)'). Please select a toolchain which matches the SDK.
01:16:33 import XCTest
01:16:33        ^

Well well well, what do we have here.

@lorentey
Copy link
Member Author

Let's pick this up again. The bogus XCTest overlay was removed (#37587) by the time the failing build above started. It is possible we picked up an older version of it from the SDK somehow, in which case we'll probably need to keep the XCTest shims in the toolchain for a year or two yet. But first, let's try again with the current state of this branch.

@lorentey
Copy link
Member Author

@swift-ci test

@lorentey
Copy link
Member Author

lorentey commented Jun 28, 2021

It is possible we picked up an older version of it from the SDK somehow

Ah, the console logs were in fact pretty clear about the issue -- the version of the real XCTest overlay in the Xcode we currently use in CI (Xcode 12.3 (12C33)) apparently still imports the old toolchain shims:

01:16:33 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/XCTest.swiftmodule/x86_64-apple-macos.swiftinterface:8:8: error: no such module '_SwiftXCTestOverlayShims'

This is unexpected, as I thought these imports were removed as far back as Xcode 11.4 (or so). 🤔

@lorentey
Copy link
Member Author

Oh, a stray import remained until Xcode 12.5. That's okay -- we just need to keep the XCTest shims around a bit longer.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 928882698a4d7669688c22246459f05a8945924e

The corresponding overlays are maintained outside of this repository, and they haven’t been importing these shims for years.

SDKs that shipped between Xcode 10.2 and Xcode 11 (or so) contained overlay modules that imported these shims modules, so future toolchain builds won’t work correctly with those SDKs. (This is fine! We do not expect toolchain builds to work with years old Xcode installations anyway.)
@lorentey
Copy link
Member Author

lorentey commented Jul 1, 2021

@swift-ci test

@lorentey lorentey merged commit bb32a75 into swiftlang:main Jul 1, 2021
@lorentey lorentey deleted the cut-back-shims branch July 1, 2021 16:39
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.

3 participants