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

fix(generator): return latest supported SourceVersion instead of 8 #2128

Merged
merged 2 commits into from Oct 5, 2022

Conversation

Proximyst
Copy link
Contributor

Fixes #2127.

We should be able to output generated code for any supported releases >= 8. Considering the bytecode we output for the artifact (i.e. the processor, not the generated code) is always Java 8 or newer as of writing, this will not be an issue.

We return the latest supported version for javac instead of the lowest version we expect to support, because javac will print warnings in that case. This breaks -Werror builds on versions higher than this is made to support (i.e. Java 9+ as of writing).

Legal note: this code is submitted under the applicable licence(s) (Apache 2.0, Jan 2004) with the ownership retained as Spotify AB.

Fixes jdbi#2127.

We should be able to output generated code for any supported releases >= 8.
Considering the bytecode we output for the artifact (i.e. the processor,
not the generated code) is always Java 8 or newer as of writing, this will
not be an issue.

We return the latest supported version for javac instead of the lowest
version we expect to support, because javac will print warnings in that case.
This breaks -Werror builds on versions higher than this is made to support
(i.e. Java 9+ as of writing).

Legal note: this code is submitted under the applicable licence(s)
(Apache 2.0, Jan 2004) with the ownership retained as Spotify AB.
@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@hgschmie
Copy link
Contributor

hgschmie commented Oct 4, 2022

Hi @Proximyst! Thank you for contributing to the JDBI project! The PR looks good to me; I kicked off the CI builds, if they pass I will merge this.

@hgschmie
Copy link
Contributor

hgschmie commented Oct 5, 2022

@Proximyst is the Legal note: this code is submitted under the applicable licence(s) (Apache 2.0, Jan 2004) with the ownership retained as Spotify AB. needed for you to contribute to the project? While we do not collect CLAs, we might need at some point, so this implies that you are allowed to grant us a license similar to the one laid out in https://www.apache.org/licenses/icla.pdf (the Apache contributor license agreement).

@Proximyst
Copy link
Contributor Author

@hgschmie Needed and needed... it needs to be made clear that the company owns the code, but that we open for use in all the clauses that the licence lays out.

I'm more than happy to look into what you (the JDBI org) and I need to do to get a CLA signed, if you folks prefer that?

@hgschmie
Copy link
Contributor

hgschmie commented Oct 5, 2022

I think we are good. This git thread suffices for me.

@hgschmie hgschmie merged commit c048190 into jdbi:master Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Generator: supported source version is lower than compiler release
3 participants