Generator appears to skip some classes in jars
Hopefully reproducible with the following:
> wget -O assertj-assertions-generator-2.0.0-unix.zip https://search.maven.org/remotecontent?filepath=org/assertj/assertj-assertions-generator/2.0.0/assertj-assertions-generator-2.0.0-unix.zip
> unzip assertj-assertions-generator-2.0.0-unix.zip
> cd assertion-generator/
assertion-generator> mkdir tmp
assertion-generator> cd tmp
tmp> wget https://jitpack.io/com/github/ga4gh/schemas/d6cc80d/schemas-d6cc80d.jar
tmp> wget http://central.maven.org/maven2/com/google/protobuf/protobuf-java/3.0.0-beta-2/protobuf-java-3.0.0-beta-2.jar
tmp> cd ..
assertion-generator> java -cp "tmp/*:lib/*" org.assertj.assertions.generator.cli.AssertionGeneratorLauncher ga4gh
assertion-generator> find ga4gh/ -type f -name "*.java" | wc -l
9
So 9 files have been generated.
assertion-generator> rm -rf ga4gh
assertion-generator> cd tmp
tmp> unzip schemas-d6cc80d.jar
tmp> cd ..
assertion-generator> java -cp "tmp:tmp/*:lib/*" org.assertj.assertions.generator.cli.AssertionGeneratorLauncher ga4gh
assertion-generator> find ga4gh/ -type f -name "*.java" | wc -l
143
Now 143 files have been generated, which is more what I was expecting.
Is this something really odd with what I'm doing? This looks to me like a bug in how the generator locates classes to generate for.
I'll look into this after my holidays :-)
If you are reusing the same tmp folder without cleaning I suspect you are generating classes for previously generated ones.
Hey,
I just want to tell you how much I appreciate your help, and therefore I want to share some great stuff with you, just take a look here http://spiquyntythe.gtechlabs.com/lngimpka
All the best, [email protected]
@msackman I finally had time to work on that, in my latest master version, I have only 9 classes generated, the changes I made lately is to only generate assertion for public classes, I believe the additional classes you see came from non public ones (I could not find your sources to be sure of that).