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!: use jdtls compiler #153

Merged
merged 17 commits into from
Oct 6, 2024
Merged

feat!: use jdtls compiler #153

merged 17 commits into from
Oct 6, 2024

Conversation

rcasia
Copy link
Owner

@rcasia rcasia commented Oct 5, 2024

Relates to #75

This is maybe what should have been done in the first place.

Reasons to use jdtls compiler are:

  • it is faster
  • it is more reliable
  • allows neotest-java to have less responsabilities

TODO:

  • Remove old code
  • Add dependency to documentation and luarock
  • Handle when compilation fails (already handled by nvim-jdtls)
  • Also support debugger
  • Check dependencies are present
  • Use java_home from jdtls settings
  • ability to run tests from the summary window

@rcasia
Copy link
Owner Author

rcasia commented Oct 5, 2024

Noticed that when running tests that contain reflection (as this one here) throw this errors with this message:

Request processing failed: java.lang.IllegalArgumentException: Name for argument
 of type [int] not specified, and parameter name information not available via reflection. 
Ensure that the compiler uses the '-parameters' flag.

It is solved when adding org.eclipse.jdt.core.compiler.codegen.methodParameters=generate to ./your-project/.settings/org.eclipse.jdt.core.prefs

@rcasia rcasia changed the title feat: use jdtls compiler feat!: use jdtls compiler Oct 5, 2024
@rcasia rcasia force-pushed the feature/compile-with-jdtls branch 2 times, most recently from 1a49d44 to 91e9d88 Compare October 6, 2024 03:48
@rcasia rcasia force-pushed the feature/compile-with-jdtls branch 2 times, most recently from e078c56 to 5d3b2cb Compare October 6, 2024 03:57
@rcasia rcasia marked this pull request as ready for review October 6, 2024 16:25
@rcasia rcasia merged commit b880a7d into main Oct 6, 2024
3 checks passed
@rcasia rcasia deleted the feature/compile-with-jdtls branch October 6, 2024 16:25
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.

1 participant