rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
10.83k stars 535 forks source link

Can't build from source #492

Open devinbost opened 1 year ago

devinbost commented 1 year ago

When I try to build from source on my M1 mac, I get this:

[info] [launcher] getting org.scala-sbt sbt 1.8.2  (this may take some time)...
[info] welcome to sbt 1.8.2 (Eclipse Adoptium Java 17.0.4.1)
[info] loading settings for project bfg-repo-cleaner-build from plugins.sbt ...
[info] loading project definition from /Users/devin.bost/proj/repos/bfg-repo-cleaner/project
[info] Updating
. . . 
  100.0% [##########] 11.5 MiB (23.0 MiB / s)
https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.10/scala-library-2.13.10.jar
  100.0% [##########] 5.7 MiB (8.4 MiB / s)
[info] Fetched artifacts of
[error] java.lang.RuntimeException: No main class detected.
[error]     at scala.sys.package$.error(package.scala:30)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
[error] (Compile / bgRun) No main class detected.
[error] Total time: 2 s, completed May 31, 2023, 8:32:50 PM
[info] 1. Monitoring source files for bfg-parent/run...
[info]    Press <enter> to interrupt or '?' for more options.
[info] Received input event: CancelWatch.
sbt:bfg-parent> exit
[info] shutting down sbt server  

How do I resolve this?

jakubpas commented 1 year ago

Same on linux

nguyenbs commented 11 months ago

Same here:

These are your protected commits, and so their contents will NOT be altered:

 * commit 2c8a72ec (protected by 'feature/slashes-are-ugly') - contains 1 dirty file :
        - bar (0 B )
[info] - should not crash encountering a protected branch containing a slash in it's name *** FAILED ***
[info]   java.io.FileNotFoundException: C:\Users\\AppData\Local\Temp\1690859146488-0\sample-repos\branchNameWithASlash.git.zip-unpacked.bfg-report\2023-08-01\10-05-46\protected-dirt\2c8a72ec-feature\slashes-are-ugly.csv (The system cannot find the path specified)
[info]   at java.io.FileOutputStream.open0(Native Method)
[info]   at java.io.FileOutputStream.open(FileOutputStream.java:270)
[info]   at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
[info]   at com.google.common.io.Files$FileByteSink.openStream(Files.java:193)
[info]   at com.google.common.io.Files$FileByteSink.openStream(Files.java:181)
[info]   at com.google.common.io.ByteSink$AsCharSink.openStream(ByteSink.java:149)
[info]   at com.google.common.io.CharSink.openBufferedStream(CharSink.java:81)
[info]   at com.google.common.io.CharSink.writeLines(CharSink.java:159)
[info]   at com.google.common.io.CharSink.writeLines(CharSink.java:126)
[info]   at com.madgag.git.bfg.cleaner.Reporter$.dump(Reporter.scala:31)
[info]   ...
[info] strip blobs by id
...
BFG run is complete! When ready, run: git reflog expire --expire=now --all && git gc --prune=now --aggressive
[info] - should be cleaned by removing the file with the duplicate FileName, leaving the folder
[info] Run completed in 6 seconds, 344 milliseconds.
[info] Total number of tests run: 17
[info] Suites: completed 3, aborted 0
[info] Tests: succeeded 16, failed 1, canceled 0, ignored 0, pending 0
[info] *** 1 TEST FAILED ***
[error] Failed tests:
[error]         com.madgag.git.bfg.cli.MainSpec
[error] (bfg / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 8 s, completed Aug 1, 2023 10:05:47 AM