Skip to content

[SR-3801] Importing an app target with a bridging header in tests results in a deprecation warning for implicit imports of bridging headers #46386

@swift-ci

Description

@swift-ci
Previous ID SR-3801
Radar rdar://problem/30202509
Original Reporter ssheldon (JIRA User)
Type Bug

Attachment: Download

Environment

macOS 10.12.3, Xcode 8.3 beta

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, 3.1Regression
Assignee graydon (JIRA)
Priority Medium

md5: 138a2e21b3d20afe9f261addc4340743

Issue Description:

Steps to repro:

  1. write an app target with a bridging header (let's say our app is called Baz)

  2. write a Swift test case that imports that app, either via import Baz or @testable import Baz

  3. compile the test target and observe a warning

The warning given is:

Implicit import of bridging header 'Baz-Bridging-Header.h' via module 'Baz' is deprecated and will be removed in a later version of Swift

If the warning is legitimate, it's unclear how it should be fixed. The only fixes I've found are removing the import (but then you can't test your code from Swift) or deleting the app's bridging header (but then you can't use your app's ObjC from its Swift).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions