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

Apply @Incubating annotations based on the incubating endpoint tag #1150

Merged
merged 3 commits into from
Nov 3, 2020

Conversation

carterkozak
Copy link
Contributor

Quick draft of what we discussed, the guava @Beta annotation turns invocations yellow in idea based on UnstableApiUsageInspection.kt#35

==COMMIT_MSG==
Apply guava @Beta annotations based on the unstable endpoint tag
==COMMIT_MSG==

Considerations:

  1. This implementation uses unstable. Would we prefer incubating, or something different?
  2. This implementation adds the gauva @Beta annotation. We can define our own in conjure-lib and update our idea configuration to apply it to the UnstableApiUsageInspection list (greater complexity, must work for both idea gradle integration and the idea ipr).

@changelog-app
Copy link

changelog-app bot commented Oct 30, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Apply @Incubating annotations based on the incubating endpoint tag

Check the box to generate changelog(s)

  • Generate changelog entry

Copy link

@lycarter lycarter left a comment

Choose a reason for hiding this comment

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

Overall this looks like exactly what we're looking for. Just a couple questions about how to make sure it ties together well for other generators

@@ -24,6 +25,7 @@ public interface TestService {
* Returns a mapping from file system id to backing file system configuration.
* @apiNote {@code GET /catalog/fileSystems}
*/
@Beta

Choose a reason for hiding this comment

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

Would it make sense to add a comment to this to explain that this corresponds to "Unstable"? Otherwise, I'd be fine with calling the APIs "Beta". I'm also curious what options we have for typescript, to ensure that they all make sense together.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how this will work in typescript, but I imagine there are similar extension points. I don't think endpoint tags have been implemented in any in conjure-typescript yet.

Choose a reason for hiding this comment

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

deprecated recently got added as a jsdoc: palantir/conjure-typescript#149

I went through the list of jsdoc tags (https://jsdoc.app/), but didn't see any that looked quite right. I'm not familiar with the ecosystem to know if there are other standards that could be leveraged besides jsdoc, but the support for jsdoc's @Deprecated only arrived in vscode in August (https://code.visualstudio.com/updates/v1_49#_deprecated-tag-support-for-javascript-and-typescript), so I don't have a lot of confidence there are good fits available.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Custom vscode plugins might be an option

@iamdanfox
Copy link
Contributor

Using the existing guava one is definitely neat, but I think it does come with the tradeoff that since so many (well used) guava APIs are already marked 'beta', it might be hard for a project to 'lock in' this check, if they wanted to have a stamp of approval that says "I don't use any beta endpoints"?

A little bit like when people are evaluating a rust crate, they're often interested to know if it contains any 'unsafe', as this might be a source of spicy bugs in the future

@carterkozak carterkozak changed the title Apply guava @Beta annotations based on the unstable endpoint tag Apply @Incubating annotations based on the incubating endpoint tag Oct 30, 2020
@carterkozak
Copy link
Contributor Author

Related: palantir/gradle-baseline#1529

@carterkozak carterkozak marked this pull request as ready for review October 30, 2020 19:06
@bulldozer-bot bulldozer-bot bot merged commit d06c379 into develop Nov 3, 2020
@bulldozer-bot bulldozer-bot bot deleted the ckozak/unstable_tag branch November 3, 2020 13:56
@svc-autorelease
Copy link
Collaborator

Released 5.34.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants