-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise empty file support for
import public
If the file defines no types, but it does have `import public` directives, then it still needs provide those imports so code only depending on this module gets the types.
- Loading branch information
Showing
5 changed files
with
59 additions
and
11 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
CompileTests/MultiModule/Sources/ReExportAOnly/reexport_a_only.pb.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// DO NOT EDIT. | ||
// swift-format-ignore-file | ||
// swiftlint:disable all | ||
// | ||
// Generated by the Swift generator plugin for the protocol buffer compiler. | ||
// Source: Sources/ReExportAOnly/reexport_a_only.proto | ||
// | ||
// For information on using the generated types, please see the documentation: | ||
// https://github.com/apple/swift-protobuf/ | ||
|
||
import SwiftProtobuf | ||
|
||
// Use of 'import public' causes re-exports: | ||
@_exported import enum ModuleA.E | ||
@_exported import let ModuleA.Extensions_ext_str | ||
@_exported import struct ModuleA.A | ||
|
||
// This file contained no messages, enums, or extensions. |
1 change: 1 addition & 0 deletions
1
Protos/CompileTests/MultiModule/Sources/ReExportAOnly/reexport_a_only.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import public "Sources/ModuleA/a.proto"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Reference/CompileTests/MultiModule/Sources/ReExportAOnly/reexport_a_only.pb.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// DO NOT EDIT. | ||
// swift-format-ignore-file | ||
// swiftlint:disable all | ||
// | ||
// Generated by the Swift generator plugin for the protocol buffer compiler. | ||
// Source: Sources/ReExportAOnly/reexport_a_only.proto | ||
// | ||
// For information on using the generated types, please see the documentation: | ||
// https://github.com/apple/swift-protobuf/ | ||
|
||
import SwiftProtobuf | ||
|
||
// Use of 'import public' causes re-exports: | ||
@_exported import enum ModuleA.E | ||
@_exported import let ModuleA.Extensions_ext_str | ||
@_exported import struct ModuleA.A | ||
|
||
// This file contained no messages, enums, or extensions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters