Closed AcidCrash1337 closed 3 years ago
Use JDK 8. It does not work with 11 or higher.
Danke! I was able to compile the tagged version with JDK 8 and it compiled with one failed test case (com.madgag.git.bfg.cli.MassiveNonFileObjectsRequiresOwnJvmSpec
). As this ticket was not about test cases passing, but rather just about compilation being functional, I am closing this ticket. I'm also submitting a pull request to update the build instructions to indicate that JDK 8 is required (it currently says "JDK 8 or above").
Attempting to compile on the master
branch failed. Something in the process compilation was killed for using too much memory. This may have been the reason for the test case failure in the tagged version.
The machine I was using did not have any GUI and so I only gave it 512MB of RAM. I'm not sure what the minimum requirements are for compiling this package. It'd be interesting to figure this out, but since I've worked around my original problem a few weeks ago, I'm not feeling especially motivated to create a series of VMs to do so. In case anyone wants to try to debug this further to determine what is taking up so much memory, or how the requirements can be reduced, here's the relevant output from my attempt at compiling master
as of commit b4fe952dc5d480b3ceb52fef81c10cc1701e73de:
[warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key
[info] sbt server started at local:///home/vagrant/.sbt/1.0/server/d85d9ae4b328e3d04db2/sock
sbt:bfg-parent> bfg/assembly
[warn] 18.716 seconds of the last 10 seconds were spent in garbage collection. You may want to increase the project heap size using `-Xmx` or try a different gc algorithm, e.g. `-XX:+UseG1GC`, for better performance.
[info] compiling 27 Scala sources to /home/vagrant/bfg-repo-cleaner/bfg-library/target/scala-2.12/classes ...
[warn] 10.776 seconds of the last 10 seconds were spent in garbage collection. You may want to increase the project heap size using `-Xmx` or try a different gc algorithm, e.g. `-XX:+UseG1GC`, for better performance.
[info] compiling 1 Scala source to /home/vagrant/bfg-repo-cleaner/bfg-test/target/scala-2.12/classes ...
[warn] 16.985 seconds of the last 10 seconds were spent in garbage collection. You may want to increase the project heap size using `-Xmx` or try a different gc algorithm, e.g. `-XX:+UseG1GC`, for better performance.
[info] compiling 4 Scala sources to /home/vagrant/bfg-repo-cleaner/bfg/target/classes ...
[info] Including: scala-library-2.12.4.jar
Killed
The BFG now compiles on both Java 8 & Java 11, fixed with abfc2c764b7, and CI-tested with Travis:
I've also updated the Scala version to 2.12.12, which the Scala project documents as compatible with JDK 11:
Thanks for reporting the issue, apologies that - like many things - it's often a long time before I can get around to replying!
Thanks for reporting the issue, apologies that - like many things - it's often a long time before I can get around to replying!
No apologies needed, friend. This is software we get for free. Thank you.
First I attempted to build the
master
repo. When I found it would not compile, I attempted to build the latest tag. Both attempts failed in the same way. Using: Ubuntu, Java 11, using sbt from sbt's ubuntu repo (as documented on their Setup page)Steps to reproduce:
Output: