NeuronRobotics/nrjavaserial

Deadlock because of old jna dependency

hborchardt opened this issue · 0 comments

I have a project that depends on nrjavaserial as well as jna. Upon adding the jna 4.4.0 dependency, when searching for serial ports I irregularly run into the deadlock resolved here:
jna commit 869bb33984a2cf701f9343ea40cca27ffec4be88, which is merged in jna 5.0.0.

Therefore, I propose updating the dependency on jna to the newest one, 5.5.0.

Additionally, it came to my attention that the jna dependency is defined in build.gradle as a compileOnly-dependency. This means that any version requirements on jna don't make it to the mvnrepository. It would be much better to declare this as an optional dependency, per this blog post. Then, I suppose, it would be enforced that it is not possible to have jna 4.4.0 as well as nrjavaserial in the same project, avoiding the bug.