Closed gnarroway closed 2 years ago
@gnarroway - there was also a problem that first sprang up in 0.7.5 with some transitive dependencies pulled in by maven. It introduced a conflict between jib and maven (something to do with com.google.guava/guava
). It really broke a lot actually. I discovered it while trying to upgrade to v0.8.1 of tools.build. I think I know the exclusion that will fix this, and it should fix everything for 0.7.5 as well.
I was planning on doing a 0.1.14 with 0.8.1 and could probably do that tomorrow morning. Are you okay with 0.8.1 of tools.build?
0.8.1 sounds good. As you said there seems to be some conflicts that need to be resolved though (I just tried bumping the dep and other things broke). Might be a good opportunity to add some initial tests to the CI so the common use cases can be validated proactively as the various moving parts (docker/jib/tools.build) change.
Thanks!
By the way, everything seemed to work for me by setting up my alias like:
com.google.guava/guava {:mvn:/version "31.1-jre"}
(same version used in jib itself)Ya, that makes sense. I've now moved v0.1.14 on to use 0.8.1 and I've let jib own that guava dependency by putting an exclusion on the tools.build dep
https://github.com/atomisthq/jibbit/blob/main/deps.edn#L5
You should be able to just move on to v0.1.14 now and I think your transitive deps will be right again.
Have been trying out jibbit and there are various strange behaviours
jibbit: 0.1.13 tools.build: 0.7.5
Does not work without
:aot
:aot
is optional, but if I don't provide it, it fails withClass files are not included in the jar when using
:aot
(:gen-class)
and using the:aot
flag, theapp.jar
in the resulting docker image does not have any class filesI've spent time debugging the 2nd issue and it seems to be due to using
tools.build
0.7.5, wheresrc-dirs
must be provided explicit as they are not inferred from the basis (akapaths
indeps.edn
). I can confirm that usingtools.build
0.8.1 directly, thecompile-clj
function generates the class files correctly even without specifyingsrc-dirs
(which is how jibbit uses it).Alternatively, allowing
src-paths
to be provided as an arg could work around it, though is a bit ugly.