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: add ApiVersion parser and comparison #189

Merged
merged 3 commits into from
Aug 29, 2023
Merged

Conversation

burkedavison
Copy link
Contributor

Creates an object to parse and compare API versions. Format defined in Javadoc for ApiVersion#parse.

@burkedavison burkedavison marked this pull request as ready for review August 29, 2023 13:13
@burkedavison burkedavison requested a review from a team as a code owner August 29, 2023 13:13
Copy link
Contributor

@alicejli alicejli left a comment

Choose a reason for hiding this comment

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

Looks good to me! Just a couple of clarifying questions. Thanks!

<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.1-jre</version>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

I know we use Guava widely in other projects so it might not apply here, but wondering if we want to highlight this additional dependency through the new dependency governance process? Or is this already a considered a "safe" dependency that any project is free to import?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CC'ing @suztomo to verify. Guava is an approved dependency to be used in sdk-platform-java, so I've used the same (latest) version here. This project doesn't use java-shared-dependencies... but perhaps we should change that?

Copy link
Member

Choose a reason for hiding this comment

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

This java-docfx-doclet doesn't appear in library users class path. So its dependencies do not matter. I don't see a problem using the shared dependencies.

* │ │ │└─── Optional: Prerelease major version
* │ │ └──── Optional: Stability level. See <a href="https://google.aip.dev/181">AIP 181</a>
* │ └──────── Optional: Minor version
* └────────── Required: Major version
Copy link
Contributor

Choose a reason for hiding this comment

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

really helpful description!

}

@Test
public void testAisGreaterThanB() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this use case would be used when determining which version to recommend?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@burkedavison burkedavison merged commit 569b29d into main Aug 29, 2023
6 checks passed
@burkedavison burkedavison deleted the api-version-parsing branch August 29, 2023 18:18
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