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

feat: generate code deprecation tags #1006

Merged
merged 7 commits into from
Mar 2, 2022
Merged

feat: generate code deprecation tags #1006

merged 7 commits into from
Mar 2, 2022

Conversation

jkaster
Copy link
Contributor

@jkaster jkaster commented Feb 25, 2022

  • adds (DEPRECATED) to deprecated method parameters that don't include the text "deprecated"
  • adds deprecated attributes for relevant Kotlin, Swift, Go, and C# methods
  • minor edits to readme
  • updated examples index
  • smoke tests for Kotlin and Swift pass

@github-actions
Copy link
Contributor

Codegen Tests

    1 files    18 suites   27s ⏱️
414 tests 400 ✔️ 14 💤 0 ❌
415 runs  401 ✔️ 14 💤 0 ❌

Results for commit 774c499.

@github-actions
Copy link
Contributor

APIX Tests

    1 files    78 suites   3m 39s ⏱️
313 tests 300 ✔️ 13 💤 0 ❌
329 runs  316 ✔️ 13 💤 0 ❌

Results for commit 774c499.

@github-actions
Copy link
Contributor

Typescript Tests

    7 files    76 suites   3m 55s ⏱️
169 tests 165 ✔️   4 💤 0 ❌
588 runs  572 ✔️ 16 💤 0 ❌

Results for commit 774c499.

Copy link
Contributor

@joeldodge79 joeldodge79 left a comment

Choose a reason for hiding this comment

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

Did you intentionally not regenerate TS-SDK and PY-SDK? Also, I didn't open examplesIndex.json but it looks like a big change so just making sure that was intentional.

The python and codegen stuff LGTM! But I don't feel qualified to review on the other languages or apix. Happy to approve if someone else can speak for those

Copy link
Contributor

@josephaxisa josephaxisa left a comment

Choose a reason for hiding this comment

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

API Explorer related changes lgtm. Happy to approve once the questions around the typescript and python SDKs are answered.

@joeldodge79 joeldodge79 mentioned this pull request Feb 25, 2022
@github-actions
Copy link
Contributor

Codegen Tests

    1 files    18 suites   27s ⏱️
414 tests 400 ✔️ 14 💤 0 ❌
415 runs  401 ✔️ 14 💤 0 ❌

Results for commit a938a0b.

@github-actions
Copy link
Contributor

APIX Tests

    1 files    78 suites   3m 19s ⏱️
313 tests 300 ✔️ 13 💤 0 ❌
329 runs  316 ✔️ 13 💤 0 ❌

Results for commit a938a0b.

@github-actions
Copy link
Contributor

Python Tests

  10 files    10 suites   2m 27s ⏱️
140 tests 140 ✔️ 0 💤 0 ❌
788 runs  788 ✔️ 0 💤 0 ❌

Results for commit a938a0b.

@github-actions
Copy link
Contributor

Typescript Tests

    7 files    76 suites   4m 18s ⏱️
169 tests 165 ✔️   4 💤 0 ❌
588 runs  572 ✔️ 16 💤 0 ❌

Results for commit a938a0b.

@github-actions
Copy link
Contributor

APIX Tests

    1 files    78 suites   3m 36s ⏱️
313 tests 300 ✔️ 13 💤 0 ❌
329 runs  316 ✔️ 13 💤 0 ❌

Results for commit 40f821e.

@github-actions
Copy link
Contributor

Codegen Tests

    1 files    18 suites   28s ⏱️
414 tests 400 ✔️ 14 💤 0 ❌
415 runs  401 ✔️ 14 💤 0 ❌

Results for commit 40f821e.

@github-actions
Copy link
Contributor

Python Tests

  10 files  ±0    10 suites  ±0   2m 37s ⏱️ -2s
140 tests ±0  140 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
788 runs  ±0  788 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 40f821e. ± Comparison against base commit 3ae42cd.

@github-actions
Copy link
Contributor

Typescript Tests

    7 files    76 suites   3m 58s ⏱️
169 tests 165 ✔️   4 💤 0 ❌
588 runs  572 ✔️ 16 💤 0 ❌

Results for commit 40f821e.

@github-actions
Copy link
Contributor

Codegen Tests

    1 files    18 suites   29s ⏱️
414 tests 400 ✔️ 14 💤 0 ❌
415 runs  401 ✔️ 14 💤 0 ❌

Results for commit e8eb24d.

@github-actions
Copy link
Contributor

APIX Tests

    1 files    78 suites   3m 27s ⏱️
313 tests 300 ✔️ 13 💤 0 ❌
329 runs  316 ✔️ 13 💤 0 ❌

Results for commit e8eb24d.

@github-actions
Copy link
Contributor

Python Tests

  10 files  ±0    10 suites  ±0   2m 42s ⏱️ +3s
140 tests ±0  140 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
788 runs  ±0  788 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit e8eb24d. ± Comparison against base commit 3ae42cd.

@github-actions
Copy link
Contributor

Typescript Tests

    7 files    76 suites   4m 14s ⏱️
169 tests 165 ✔️   4 💤 0 ❌
588 runs  572 ✔️ 16 💤 0 ❌

Results for commit e8eb24d.

@github-actions
Copy link
Contributor

Go Tests

  5 files    5 suites   56s ⏱️
34 tests 34 ✔️ 0 💤 0 ❌
72 runs  72 ✔️ 0 💤 0 ❌

Results for commit 8bbe8cd.

@jkaster
Copy link
Contributor Author

jkaster commented Feb 25, 2022

All SDKs have been updated where appropriate and regenerated. As mentioned in the PR description, the examples index is also updated. That should be something that runs as part of CI/CD or as part of the release process. And also whenever new examples are submitted. TODO

@github-actions
Copy link
Contributor

Codegen Tests

    1 files    18 suites   27s ⏱️
415 tests 401 ✔️ 14 💤 0 ❌
416 runs  402 ✔️ 14 💤 0 ❌

Results for commit 8bbe8cd.

@github-actions
Copy link
Contributor

APIX Tests

    1 files    78 suites   3m 46s ⏱️
313 tests 300 ✔️ 13 💤 0 ❌
329 runs  316 ✔️ 13 💤 0 ❌

Results for commit 8bbe8cd.

@github-actions
Copy link
Contributor

Python Tests

  10 files  ±0    10 suites  ±0   2m 41s ⏱️ +2s
140 tests ±0  140 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
788 runs  ±0  788 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 8bbe8cd. ± Comparison against base commit 3ae42cd.

@github-actions
Copy link
Contributor

Typescript Tests

    7 files    76 suites   4m 9s ⏱️
169 tests 165 ✔️   4 💤 0 ❌
588 runs  572 ✔️ 16 💤 0 ❌

Results for commit 8bbe8cd.

@joeldodge79
Copy link
Contributor

I'm confused about why the generated csharp, go, kotlin, and swift SDKs all seem to have the deprecated stuff but typescript and python don't - even though I see the required changes in their generators. I assume this is still WIP @jkaster ?

@jkaster
Copy link
Contributor Author

jkaster commented Mar 1, 2022 via email

@jkaster
Copy link
Contributor Author

jkaster commented Mar 1, 2022

I'm confused about why the generated csharp, go, kotlin, and swift SDKs all seem to have the deprecated stuff but typescript and python don't - even though I see the required changes in their generators. I assume this is still WIP @jkaster ?

@joeldodge79 that's because the specification with deprecated parameters won't be available until Looker 22.4 is released. This change added deprecated params to the test specs used for testing the generator. This PR is done after adding new deprecation tags for some of the generators, and has new unit tests that verify tagging deprecated params as well as method deprecation attributes where appropriate. TypeScript already had @deprecated tags for methods.

Comment on lines +294 to +296
${this.deprecated(indent, method)}${indent}${this.jvmOverloads(method)}fun ${
method.name
}(
Copy link
Contributor

Choose a reason for hiding this comment

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

This change was the source of my confusion. It's not related to deprecated method params - instead it's back-filling already existing functionality to deprecate a whole method. Typescript already had it and you added it in this PR kotlin, csharp, go, swift but not python.

When I saw deprecated showing up in generated code for some languages and not others I got really confused.

I'm ok with this as is, but I feel like had this bullet point in your PR description been a different PR I would have gotten through this one a lot quicker.

adds deprecated attributes for relevant Kotlin, Swift, Go, and C# methods

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you add that description to the PR? I see it now. This PR was for adding deprecated tags where appropriate. Python has no deprecation attributes that I could find, so I didn't add deprecated tags to the method headers. This was to bring the other SDKs that support deprecated notation up to date with TypeScript, and add deprecation comments to method params for TypeScript, and to add deprecated comments for method parameters.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

Go Tests

  5 files    5 suites   1m 2s ⏱️
34 tests 34 ✔️ 0 💤 0 ❌
72 runs  72 ✔️ 0 💤 0 ❌

Results for commit 898b338.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

Codegen Tests

    1 files    18 suites   24s ⏱️
415 tests 401 ✔️ 14 💤 0 ❌
416 runs  402 ✔️ 14 💤 0 ❌

Results for commit 898b338.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

APIX Tests

    1 files    78 suites   3m 37s ⏱️
313 tests 300 ✔️ 13 💤 0 ❌
329 runs  316 ✔️ 13 💤 0 ❌

Results for commit 898b338.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

Python Tests

  10 files    10 suites   2m 33s ⏱️
140 tests 140 ✔️ 0 💤 0 ❌
788 runs  788 ✔️ 0 💤 0 ❌

Results for commit 898b338.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

Typescript Tests

    7 files    76 suites   4m 8s ⏱️
169 tests 165 ✔️   4 💤 0 ❌
588 runs  572 ✔️ 16 💤 0 ❌

Results for commit 898b338.

@jkaster jkaster merged commit afd4b66 into main Mar 2, 2022
@jkaster jkaster deleted the jk/deprecated_params branch March 2, 2022 21:00
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

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