2

We're using SBT 0.13.13 with SBT assembly 0.14.3

Lately, sbt assembly started getting stuck when trying to read some XML files. After some digging we found out it happens because SBT generates a directory streams under the target dir & inside that streams dir it generates a directory $global. I'm not quite sure whats this $global dir is but if I cd into, it takes me back to my root dir

We were only able to actually execute the sbt assembly successfully after adding this to our assembly merge strategy code:

case ff if !ff.getAbsolutePath.contains("$") =>
          XML.loadFile(ff)

And so my questions are:

  • Why is SBT generating a streams dir under target?
  • What is this mysterious $global dir?
  • Did someone else encounter this issue and solved it in a more elegant way?

Thanks in advance

Gideon
  • 2,211
  • 5
  • 29
  • 47
  • SBT 0.13.8 is quite old. Did you try upgrading your SBT? Latest version is `0.13.15`. – Yuval Itzchakov Jul 10 '17 at 11:26
  • Hi Yuval, I had a mistake in the version, we're actually using 0.13.13 – Gideon Jul 10 '17 at 11:32
  • I see. Try using `logLevel in assembly := Level.Debug`, you might get more information about where it's actually stuck, perhaps that can help us narrow down the problem. – Yuval Itzchakov Jul 10 '17 at 11:34
  • I know where the problem is - its trying to read the $global dir under target/streams and it fails. Once I tell it to ignore dirs containing $ its working. I'm curious to understand what is actually happening here – Gideon Jul 10 '17 at 11:41
  • I don't know if it is related, but this sbt issue causing an IOException because of the $global dir has been dogging us for...years. https://github.com/sbt/sbt/issues/2156 – xref Mar 15 '18 at 16:29
  • I also want to know this mysterious $global dir, anyone knows? THanks – jack Jun 05 '20 at 10:04

0 Answers0