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

[SR-7987] Xcode 10 beta (10L176w): Swift extension can't find original ObjC class. #50520

swift-ci opened this issue Jun 13, 2018 · 4 comments


Copy link

@swift-ci swift-ci commented Jun 13, 2018

Previous ID SR-7987
Radar rdar://41080489
Original Reporter stuffmc (JIRA User)
Type Bug
Status Resolved
Resolution Invalid

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.2Regression, ClangImporter
Assignee None
Priority Medium

md5: 68f69c2753636c02fdea393850c66258

Issue Description:

My project runs fine in Xcode 9.4 — Xcode 10 however can't seem to find the ObjC class. Same Swift setting (Swift 4).

Steps to Reproduce:
Compile my project (working fine in Xcode 9) with Xcode 10.

Expected Results:
Should compile

Actual Results:
Provider.swift:17:24: Use of undeclared type 'ProviderApple'

code is

@objc public extension ProviderApple {

Xcode 10 beta (10L176w)

MacBook Pro 15" 2017 fully configured.

If needed, I can provide a sample project.

Copy link

@belkadan belkadan commented Jun 13, 2018

A project would be very helpful!

Copy link
Collaborator Author

@swift-ci swift-ci commented Jun 14, 2018

Comment by Manuel "StuFF mc" Carrasco Molina (JIRA)

The file `` I attached is a project which compiles without any errors or warning on Xcode 9.4 but where the compile error described comes in Version 10.0 beta (10L176w).

Copy link
Collaborator Author

@swift-ci swift-ci commented Jul 8, 2018

Comment by Manuel "StuFF mc" Carrasco Molina (JIRA)

Many things are weird here. First of all rdar://41080489 says the bug is "fixed", but it's not. I'm surprised there are 2 "sources", and it's not closed here. Also, it's not closed anyways because their suggested fix might help (I didn't even bother checking) but then how to explain that this fix isn't needed in Xcode 9.4.1 for the project to compile? Would it be a bug in Xcode 9.4.1 and Xcode 10 would be right?

Copy link

@belkadan belkadan commented Jul 9, 2018

That bug is closed as "Behaves Correctly", and it is. Did ADC not pass the explanation along to you?

…well, here it is, anyway.

The [Objective-C] code is not available for use as DEFINES_MODULE=NO, thus no module definition is created and being passed into the Swift compiler. There was a bug in the legacy build system that would create this module. We have a issue (41779737) to track providing a better error message in this circumstance, but this is the correct behavior.

(Oh, and the reason this bug didn't get closed is because it turned out to be an Xcode change, not a Swift change, and the Xcode people don't usually go look at the Swift JIRA.)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants