-
Notifications
You must be signed in to change notification settings - Fork 167
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
Crash in relativize when source directory not in subfolder #128
Comments
Thanks for reporting. Please give me access to a reproducible test case. In the meantime you may want to consider the following quick fix: Try to avoid non standard project layouts, they are confusing for beginners anyway. |
I could only reproduce it with two projects: https://gist.github.com/3236082
|
Thanks. I think what you are trying to do is not possible in Eclipse. Could you please confirm? Of course sbteclipse should not fail with an error, but if your scenario was valid for Eclipse, then I would have to treat it differently. |
I don't know if it's possible in eclipse, I don't actually use eclipse currently. As you say, sbteclipse should just not crash, and skip the project if it cannot be expressed as an eclipse classpath. |
Another way to reproduce the problem is to have your target directory outside of the project base path. The contents of project/Build.scala reproducing the problem: import sbt._ My preferred solution would be to have sbteclipse produce an Eclipse-compatible directory layout with the help of symbolic links. |
Here's what you need for relative directories in Eclipse: in the
In the
It appears eclipse is emulating symlinks. If you look in the build path settings, the feature is the "link source" button. I'm adding a +10 for adding this feature. I run into it all the time on my current project. IF you guide me in how to fix it (what files I should be touching) I'm more than willing to submit a patch.
|
OH, also related, if the path has ".." in it, this plugin is not catching that it is non-relative. I think this may be due to SBT's relativize function, if so I can report against SBT. |
BTW this is ffixed in 2.2.0-RC1 if you could give it a try. |
Fails the same way on my example even after switching to sbteclipse-plugin 2.2.0-RC1. |
I have a project where
(sourceDirectory in Test)
is not a child ofbaseDirectory
, it's only accessible through the parent. Callingsbt.IO.relativize
will returnNone
and thereforedef relativize
inEclipse.scala
crashes.The text was updated successfully, but these errors were encountered: