Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

IOException on compilation (filename too long) when code is checkout into an encrypted directory #811

Closed
giabao opened this issue Mar 7, 2014 · 5 comments

Comments

@giabao
Copy link

giabao commented Mar 7, 2014

This error can be fixed by adding scala scalacOptions ++= Seq("-Xmax-classfile-name", "100")

Refs:

@jrudolph
Copy link
Member

jrudolph commented Mar 7, 2014

IIUC this feature doesn't work together with separate compilation. So, I don't think it is something we can fix. If you have other info, please reopen.

@jrudolph jrudolph closed this as completed Mar 7, 2014
giabao added a commit to giabao/spray that referenced this issue Mar 7, 2014
… long) when code is checkout into an encrypted directory
@giabao
Copy link
Author

giabao commented Mar 7, 2014

what is "separate compilation"?

I clone spray (branch release/1.3) into my home folder - which is encrypted (I use ubuntu 12.04) and can't compile it.
When I add the above scalac options then I can run sbt test, sbt publish-local without error.

@jrudolph
Copy link
Member

jrudolph commented Mar 7, 2014

The question is if you can still use it together with other software not built with the same flag.

@jrudolph
Copy link
Member

jrudolph commented Mar 7, 2014

Here's a branch that shows what can happen if you use the flag without using it in all projects:

https://github.com/jrudolph/spray/compare/w;max-classfile-name-breakage?expand=1

Run test:run in project spray-routing-tests.

@jrudolph
Copy link
Member

jrudolph commented Mar 7, 2014

Btw. it might be that adding the flag doesn't break something right now but that's just coincidental because the flag is more likely to apply to classes with long names which in many cases are anonymous, implementation-private classes that won't be referenced from third parties. However, as the example shows, it could happen to public identifiers as well which could lead to silent breakage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants