Skip to content

Commit 1ba0227

Browse files
authored
Add explicit access-level modifier support for imports in code generator (#2010)
## Motivation This is a follow-up of grpc/grpc-swift#2003. As of 5.9, Swift supports access-level modifiers on imports. In an upcoming Swift 6.x release, the default modifier will become `internal`. ## Modifications This PR adds explicit access-level modifiers to the generated code and a few other modules that use this generated code. ## Result Explicit access level imports present in more places.
1 parent 7feca6a commit 1ba0227

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Sources/InteroperabilityTests/Generated/empty_service.grpc.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
// For information on using the generated types, please see the documentation:
2222
// https://github.com/grpc/grpc-swift
2323

24-
import GRPCCore
25-
import GRPCProtobuf
24+
public import GRPCCore
25+
internal import GRPCProtobuf
2626

2727
public enum Grpc_Testing_EmptyService {
2828
public static let descriptor = ServiceDescriptor.grpc_testing_EmptyService

Sources/InteroperabilityTests/Generated/test.grpc.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
// For information on using the generated types, please see the documentation:
2525
// https://github.com/grpc/grpc-swift
2626

27-
import GRPCCore
28-
import GRPCProtobuf
27+
public import GRPCCore
28+
internal import GRPCProtobuf
2929

3030
public enum Grpc_Testing_ReconnectService {
3131
public static let descriptor = ServiceDescriptor.grpc_testing_ReconnectService

Sources/Services/Health/Generated/health.grpc.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
// For information on using the generated types, please see the documentation:
2525
// https://github.com/grpc/grpc-swift
2626

27-
import GRPCCore
28-
import GRPCProtobuf
27+
package import GRPCCore
28+
internal import GRPCProtobuf
2929

3030
package enum Grpc_Health_V1_Health {
3131
package static let descriptor = ServiceDescriptor.grpc_health_v1_Health

Sources/Services/Health/Health.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import GRPCCore
17+
public import GRPCCore
1818

1919
/// ``Health`` is gRPC’s mechanism for checking whether a server is able to handle RPCs. Its semantics are documented in
2020
/// https://github.com/grpc/grpc/blob/master/doc/health-checking.md.

Sources/Services/Health/HealthService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import GRPCCore
17+
internal import GRPCCore
1818

1919
@available(macOS 15.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
2020
internal struct HealthService: Grpc_Health_V1_HealthServiceProtocol {

0 commit comments

Comments
 (0)