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

Turn Network{Implementation,Preference} enums into structs #866

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jun 30, 2020

Motivation:

Public enums are a pain for API evolution and there's no need for users to
be able to exhaustively switch over NetworkImplementation and
NetworkPreference.

Modifications:

  • Turn both into structs backed by enums

Result:

More evolvable API.

@glbrntt glbrntt added kind/enhancement Improvements to existing feature. nio ⚠️ semver/major Breaks existing public API. labels Jun 30, 2020
@glbrntt glbrntt requested a review from Lukasa June 30, 2020 15:39
Sources/GRPC/PlatformSupport.swift Outdated Show resolved Hide resolved
Sources/GRPC/PlatformSupport.swift Outdated Show resolved Hide resolved
Motivation:

Public enums are a pain for API evolution and there's no need for users to
be able to exhaustively switch over `NetworkImplementation` and
`NetworkPreference`.

Modifications:

- Turn both into structs backed by enums

Result:

More evolvable API.
@glbrntt glbrntt force-pushed the gb-public-enum-network-impl branch from 4e250b0 to 7068629 Compare June 30, 2020 16:21
@glbrntt glbrntt requested a review from Lukasa July 1, 2020 08:23
@glbrntt
Copy link
Collaborator Author

glbrntt commented Jul 6, 2020

ping @Lukasa

@glbrntt glbrntt removed the nio label Jul 6, 2020
@Lukasa Lukasa merged commit 41491f6 into grpc:master Jul 7, 2020
@glbrntt glbrntt deleted the gb-public-enum-network-impl branch July 7, 2020 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements to existing feature. ⚠️ semver/major Breaks existing public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants