New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
name mangling is hitting hard path length limits #3623
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3623?orig=1 |
Bram (bneijt) said: I've notified the debian scala package maintainers as I fear this may be a problem on the debian package build hosts. |
@milessabin said: |
@paulp said:
Can you reconcile this with the fact that he was able to build in "/tmp/s" but not in a longer named directory? Obviously the longest path element is the same in both cases. Only the path is shorter. |
@paulp said: ...which suggests the failure is due to using an encrypted filesystem. (Reporter? Confirm or deny?) |
@paulp said: |
@milessabin said:
I'm afraid I can't reconcile it. But I know for sure that on the ext3 machine I'm typing this on I have plenty of paths which are longer than 255 bytes. You're right to flag this up ... it's a problem on all platforms. The following has a useful table summarizing the various limits, |
Bram (bneijt) said: I've done some more digging and seems that this bug is invalid :D The problem was my encrypted home directory (ecryptfs) has a problem with the filenames, not my system in itself. I was able to succesfully build scala 2.8.0 RC7 from Output was comparable to the ones posted earlier. I think this bug can be considered invalid from my point of view, I have no problem with it anymore and neither should packaging scala 2.8.0 for Debian (which was my main concern here). I'd be fine with this bug being considered invalid or an enhancement. |
@paulp said:
I hope you didn't have to dig too far for that given that I identified that as the likely issue pretty clearly [http://lampsvn.epfl.ch/trac/scala/ticket/3623#comment:4 on this very page of comments]. I'm keeping it open because given the tendency of mangling to go places nobody wants or expects, it's an issue regardless. |
@odersky said: |
@paulp said:
I'll take it. |
Thomas Lochmatter (thomas.lochmatter) said:
On Windows, the situation is worse: Though NTFS is able to handle file names up to 255 chars, the Windows API commonly uses a maximum path length of 260 chars. There are ways get around that limit, but even Windows 7 Explorer displays error messages when trying to delete, rename or copy files with very long file names, and so do many other Windows programs. It would help us very much to have an option in the Scala compiler to generate short file names (i.e. < 40 chars) only. |
Jim Balter (jibal) said: |
@paulp said: |
Scott Emmons (scotte) said: |
Scott Emmons (scotte) said: |
Dimitar Georgiev (dgeorgiev) said: Regards, Dimitar |
@szeiger said: import java.nio.file._
val fs = FileSystems.getDefault
def ok(i: Int) =
try {
fs.getPath("x" * i)
true
} catch {
case _: InvalidPathException => false
}
val max = (255 to 1 by -1).iterator.find(ok)
max match {
case Some(n) => println("Use up to "+n)
case None => println("Some problem")
} This may fail if a path is too long but I don't know if the default fs providers implement this feature. On OSX it will happily report that I can create a file name of length 10 million. |
Erik LaBianca (easel) said (edited on Apr 7, 2016 3:20:25 PM UTC): |
Merlin Göttlinger (mgttlinger) said (edited on Apr 7, 2016 3:23:04 PM UTC): |
Erik LaBianca (easel) said: |
Mario Pastorelli (melrief) said: For people interested in a workaround, if you have a directory that is not encrypted, say |
This is what I needed to add to
|
agree, and therefore scala/scala#7497 proposes to drop support for that flag entirely closing the ticket since I don't think there's anything else actionable here |
The text was updated successfully, but these errors were encountered: