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

Build against Dropwizard 1.3.7, target Java 8 #33

Open
JonMR opened this issue Oct 12, 2018 · 1 comment
Open

Build against Dropwizard 1.3.7, target Java 8 #33

JonMR opened this issue Oct 12, 2018 · 1 comment
Assignees

Comments

@JonMR
Copy link
Contributor

JonMR commented Oct 12, 2018

I tried building against Dropwizard 1.3.7 just to see what would happen.

It looks like Guava Supplier now just proxies to java.util.function.Supplier, which doesn't exist in Java 7. That's a problem since we set our compiler source and target 1.7. Changing source and target to 1.8 fixed the problem, but I was using JDK 9 and ran into a series of runtime dependency issues. I'm guessing none of this is a problem for users. Still, passing builds for development seems important.

Maybe it's time for a general refresh.

Here's my thoughts:

  1. Build against Dropwizard 1.3.7
  2. Target Java 8
  3. Update any massively outdated dependencies
  4. Replace any resulting deprecations
  5. Ensure builds using Java 9-11 work without error

This would be a new major version.

I've got a branch started with some of the changes already.

@JonMR JonMR self-assigned this Oct 12, 2018
@JonMR
Copy link
Contributor Author

JonMR commented Oct 12, 2018

Running the tests on my PR gives this warning. It's harmless in the context of our tests, but it'd be nice to fix.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.fasterxml.jackson.module.afterburner.util.MyClassLoader (file:/(removed)/.m2/repository/com/fasterxml/jackson/module/jackson-module-afterburner/2.9.6/jackson-module-afterburner-2.9.6.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.module.afterburner.util.MyClassLoader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Some cursory googling led to these suggestions:

  1. Wait for Jackson 3
  2. Turn off warnings (Java 9 and up only?)
  3. Set some Jackson setting I don't understand (Might be Jackson version specific?)

None of which sounds ideal.

I'd also like to take a look at JUnit 5. I'm guessing tooling and IDEs have caught up by this point where it's usable. JUnit 5 has decided to ditch Rule and RuleChain in favor of extensions, which could complicate things. 👎 While that's kind of a pain, dropwizard does provide a few extensions. Knowing all that I've created a new issue for it, #35.

Edit: there's a bunch of dependency convergence issues to fix too.

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

No branches or pull requests

1 participant