ptrd / kwik

A QUIC client, client library and server implementation in Java. Supports HTTP3 with "Flupke" add-on.
GNU General Public License v3.0
390 stars 57 forks source link

Question about dependencies #41

Closed AlexanderSchuetz97 closed 6 months ago

AlexanderSchuetz97 commented 6 months ago

Hello, when using flupke (which depends on kwik) I have noticed 2 dependencies in the dependency tree that I cannot explain why they are there or must be there.

The two dependencies are org.glassfish:javax.json:1.1.4 and commons-cli:commons-cli:1.4 I do not have an issue with these dependencies but I do not see a reason for them to exist outside of testcode when using kwik as a library for flupke.

commons-cli only exists for command line argument parsing and json processing is at least to my humble knowledge not part of the transport protocoll but should be handled by the application?

Did these dependencies perhaps leak into the library by mistake? I am using flupke 0.5.3 which uses kwik 0.8.8.

Sincerely Alexander Schütz

ptrd commented 6 months ago

Hi,

Indeed, commons-cli is only used for KwikCli command line processing, but as this client is part of the release artifact.... Maybe it would be better to split Kwik into a "core" module and a separate artifact for samples, than you would get rid of this dependency.

JSON is certainly not part of the transport protocol, but it is used by the QLog implementation (class https://github.com/ptrd/kwik/blob/master/src/main/java/net/luminis/quic/qlog/ConnectionQLog.java) to generate JSON output.

AlexanderSchuetz97 commented 6 months ago

Getting rid of commons-cli in the dependency that flupke uses would be appreciated.

Also making QLog optional would probably also be a good idea, because at least I do not intend to enable low level protocol logging in my application. But this is not a high priority now that I know what its used for.

Thank you for the clarification.

ptrd commented 4 months ago

Both dependency issues are now fixed by using gradle submodules, see https://github.com/ptrd/kwik/commits/submodules/.

AlexanderSchuetz97 commented 4 months ago

Thank you, once your updated libraries are released on maven central I will automatically get this fix. Ill check the next time I update kwik and flupke in my project.