You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, com.approvaltests:approvaltests:18.5.0 has a lot of "optional" dependencies.
However, in practice, it makes it hard to use the library.
For instance, I wanted to try json approvals, so I tried JsonApprovals.verifyJson("test"), and the test failed in runtime with
com/google/gson/JsonSyntaxException
java.lang.NoClassDefFoundError: com/google/gson/JsonSyntaxException
at org.approvaltests.JsonApprovals.verifyJson(JsonApprovals.java:20)
at org.approvaltests.JsonApprovals.verifyJson(JsonApprovals.java:16)
Of course, I'm a programmer, and I know NoClassDefFoundError means the class is missing in runtime, because, well, my app does not really use Gson.
If Approvals wants Gson, fine, however, I would suggest adding a regular (non-optional) dependency.
So if you split modules like
approvaltests-core
approvaltests-json-gson: depends on approvaltests-core, and gson
approvaltests-json-jackson: depends on approvaltests-core, and jackson
approvaltests: depends on approvaltests-core, approvaltests-json-* dependencies for backward compatibility
Then the users would be able to pull just the libraries they need (e.g. approvaltests-json-jackson), and they would get all the needed (e.g. jackson) dependencies automatically.
The text was updated successfully, but these errors were encountered:
Currently,
com.approvaltests:approvaltests:18.5.0
has a lot of "optional" dependencies.However, in practice, it makes it hard to use the library.
For instance, I wanted to try
json
approvals, so I triedJsonApprovals.verifyJson("test")
, and the test failed in runtime withOf course, I'm a programmer, and I know
NoClassDefFoundError
means the class is missing in runtime, because, well, my app does not really use Gson.If Approvals wants Gson, fine, however, I would suggest adding a regular (non-optional) dependency.
So if you split modules like
Then the users would be able to pull just the libraries they need (e.g.
approvaltests-json-jackson
), and they would get all the needed (e.g. jackson) dependencies automatically.The text was updated successfully, but these errors were encountered: