Skip to content

Conversation

gjcairo
Copy link
Collaborator

@gjcairo gjcairo commented Aug 8, 2024

Motivation

This is a follow-up of #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.

@gjcairo gjcairo added the version/v2 Relates to v2 label Aug 8, 2024
@gjcairo gjcairo requested a review from glbrntt August 8, 2024 16:04
Comment on lines 91 to 92
/// - Note: This defaults to `public`, which is the default access level for imports on compilers
/// up to and including Swift 6.0.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit misleading because we don't default it. I think you mean if it isn't explicitly set then assumed implicit default is public.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm yes but with this API this isn't an optional argument, we're not defaulting it so it must always be explicit. I'll just get rid of this comment (unless we want to default it in the init)

@gjcairo gjcairo force-pushed the generated-imports branch from 8f121f4 to 166394d Compare August 12, 2024 13:36
@gjcairo gjcairo force-pushed the generated-imports branch from 2e2b343 to feadd9c Compare August 12, 2024 14:03
@gjcairo gjcairo requested a review from glbrntt August 12, 2024 14:03
Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Gus!

@gjcairo gjcairo enabled auto-merge (squash) August 12, 2024 14:30
@gjcairo gjcairo merged commit 3dce993 into grpc:main Aug 12, 2024
@gjcairo gjcairo deleted the generated-imports branch August 13, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version/v2 Relates to v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants