technomancy / leiningen

Moved to Codeberg; this is a convenience mirror
https://codeberg.org/leiningen/leiningen
Other
7.29k stars 1.61k forks source link

`lein repl` gets stuck when adding opentelemetry agent jar as `:jvm-opts` in a project that has `:java-source-paths` #2818

Open StankovicMarko opened 3 months ago

StankovicMarko commented 3 months ago

Describe the bug Problem is very simple. I have a project that is using java classes so i have :java-source-paths in the project.clj. I wanted to add open telemetry agent in order to add some observability to the app. By following documentation i added appropriate jvm-opts for the needs of the project. After that lein repl doesn't start and it gets stuck at Compiling 1 source files to <path..>/target/classes

To Reproduce Steps to reproduce the behavior:

  1. Go to minimal example project: https://github.com/StankovicMarko/test-agent
  2. Run the command lein repl
  3. See that it's stuck after Compiling 1 source files to <your path>/target/classes

Actual behavior Agent is started and you can see metrics exported on http://localhost:9464/metrics but repl isn't starting. Commenting out :jvm-opts and leaving :java-source-paths - repl starts without a problem commenting out :java-source-paths and leaving :jvm-opts - repl starts without a problem

Expected behavior Agent is started and repl is started as well.

Link to sample project https://github.com/StankovicMarko/test-agent

Logs

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[otel.javaagent 2024-06-14 23:54:56:453 +0200] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 2.4.0
Compiling 1 source files to <path>/test-agent/target/classes
<stuck at this point>

Environment

Additional context /