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

Swift: Add flag to omit deprecated enum cases #1595

Conversation

kevinmbeaulieu
Copy link
Contributor

@kevinmbeaulieu kevinmbeaulieu commented Oct 17, 2019

Implement feature request described in apollographql/apollo-ios#840

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

@apollo-cla
Copy link

@kevinmbeaulieu: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@designatednerd
Copy link
Contributor

Ignore the unrelated failures in the windows 10 one.

Can you add some tests for this please?

@kevinmbeaulieu
Copy link
Contributor Author

@designatednerd Added tests for both the enabled & disabled states of the new flag

@@ -64,6 +64,9 @@ export default class Generate extends ClientCommand {
namespace: flags.string({
description: "The namespace to emit generated code into."
}),
omitDeprecatedEnumCases: flags.boolean({
description: "Omit deprecated enum cases from generated code [Swift only]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this default to false to preserve existing behavior, or would that be overkill?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I intended for this to default to false to preserve existing behavior- is that not how it would behave as currently implemented? Looking at the implementation of flags.boolean I saw "specifying a default of false is the same not specifying a default"

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok (not exactly a typescript expert over here). I think that should work fine, then.

@designatednerd designatednerd merged commit 6a5ae4b into apollographql:master Oct 18, 2019
@kevinmbeaulieu kevinmbeaulieu deleted the kb/omit-deprecated-enum-cases branch October 18, 2019 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants