I fetched the latest revision of the repository and tried to do a mvn clean install. The compilation of scala.core failed with error message "File name too long" without more information (which file?). Adding -verbose to the scala compiler options reveiled that the error occurs in ast.ScalaAstVisitor:
[wrote 'ScalaAstVisitor$treeTraverser$$anonfun$org$netbeans$modules$scala$core$ast$ScalaAstVisitor$treeTraverser$$traverse$11' to /home/bert/nbscala/scala.core/target/classes/org/netbeans/modules/scala/core/ast/ScalaAstVisitor$treeTraverser$$anonfun$org$netbeans$modules$scala$core$ast$ScalaAstVisitor$treeTraverser$$traverse$11.class]
error: File name too long
one error found
Platform version info:
$ mvn -v
Apache Maven 2.2.1 (rdebian-4)
Java version: 1.6.0_24
Java home: /usr/lib/jvm/java-6-sun-22.214.171.124/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux" version: "2.6.35-28-generic-pae" arch: "i386" Family: "unix"
It seems you os's filesystem does not support longer file names? That's sad.
I did some more research, the bug is in eCryptfs which I use to encrypt my home directory. Sad, indeed...
Closing this issue...
It's not so much a bug in ecryptfs as it is a disagreement between ecryptfs and scala. There was a bug in ecryptfs where it did not correctly indicate max file name lengths. As of ubuntu 12.04 and derivatives, that bug is now fixed, but scala ignores that advice and continues to create outrageously long filenames - so now the bug is fully in scala's court.
The ubuntu maintainers agree with @scotte:
Please do create new bugs when an application generates filenames that are too long to be stored in an eCryptfs mount. The application may be able to use the statfs() syscall to check the filename length limits of eCryptfs.
I'm not actually a Scala guy (I just need to compile a Scala project), so I don't know how the tooling space around Scala looks, but it seems odd that this bug is listed on the NetBeans Scala project. Shouldn't the scala compiler configure itself with statfs()?
It's important to note that this really is an error on Scalas part, the hard limit for file name length on an unencrypted ext3 is 254 bytes, which is not massively larger than the 112 byte limit of ecryptfs. If Scala wants to compile on linux systems, it will need to take the max file name size into account.
Well, I got the same problem as very annoying and with no explanation as the file names have no visible illegal characters and are not too long and not copied or deleted and found good stuff at http://pathtoodeep.com/ and also over here. Thanks
In Scala you can use the option "-Xmax-classfile-name " option to limit the maximum filename length for generated classes.
Fix for issue compiling with openjdk7, Fix for problem on ubuntu 12.0…
…4 w/ encrypted homes detailed in discussion here:dcaoyuan/nbscala#9
The option -Xmax-classfile-name set to 110 safe my Scala builds against filename too long. THANKS !! 👍 😄