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

add PGProperty fields (conditionally) to reflection config #1056

Merged
merged 1 commit into from
Nov 7, 2021

Conversation

bobisageek
Copy link
Contributor

fixes #1046

The pg driver appears to use reflection to check annotations on fields. This change will make those fields available.

The executable sizes produced by my build process are a) not in the "reference context" for size and b) not amazingly consistent, but as far as I can tell:

  • when postgres flag is false, the executable size with the change is about 1KB larger than without the change
  • when postgres flag is true, the executable seems to consistently be smaller by 100KB - 1MB with the change than it is without the change (I don't understand that, but it seems to work out that way on Windows)

Regarding functional testing, I was able to use the postgresql-test class with BABASHKA_TEST_ENV=native (with removing the tu/jvm? condition) in

(if (and tu/jvm? (jdbc-feature-flag?) (pg-feature-flag?))

pre-change, this test exhibits a similar behavior to that described in #1046 (throwing a java.lang.ExceptionInInitializerError). Post-change, the test passes. I also tested using a postgres container to more directly reproduce the issue described and verify that the issue is resolved by the change.

@borkdude borkdude merged commit fb1a1cf into babashka:master Nov 7, 2021
@borkdude
Copy link
Collaborator

borkdude commented Nov 7, 2021

Thanks!

@bobisageek bobisageek deleted the postgres-fields branch November 7, 2021 21:22
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.

Babashka compiled with JDBC and POSTGRESQL feature flags fails due to missing field ALLOW_ENCODING_CHANGES
2 participants