Absolute Pathnames in .scala_dependencies Should be Relative to Project
I have the latest Scala-IDE plugin with Eclipse 3.5 on OSX 10.6, and it's been working OK. Today I tried to edit my project and got a strange error.
I looked in the Error List, and I saw that it was referring to the project directory with a different case than what was on disk. (I had re-checked the
project out from Hg, with the directory name in all lowercase, but originally, there were some capital letters in the directory name.) Anyway, the
problem seems to be that the plugin stores absolute paths to every file in the project in the .scala_dependencies file. Is there some reason why
the paths are not relative to the project-directory? This is going to cause problems with teams, unless that file is either excluded from source
control, or everyone on the team has everything in the exact same places, and the case doesn't change between OSs. Below is the contents
of my .scala_dependencies for a test project:
/Users/jgibson/src/workspace/ScalaTB/bin:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/369/1/.cp/lib/scala-library.jar:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/369/1/.cp/lib/scala-dbc.jar:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/369/1/.cp/lib/scala-swing.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar
-------
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala
-------
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Car1.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Car1$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Marker$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Marker.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Person$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Person.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Vehicle$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Car.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Vehicle.class
I looked in the Error List, and I saw that it was referring to the project directory with a different case than what was on disk. (I had re-checked the
project out from Hg, with the directory name in all lowercase, but originally, there were some capital letters in the directory name.) Anyway, the
problem seems to be that the plugin stores absolute paths to every file in the project in the .scala_dependencies file. Is there some reason why
the paths are not relative to the project-directory? This is going to cause problems with teams, unless that file is either excluded from source
control, or everyone on the team has everything in the exact same places, and the case doesn't change between OSs. Below is the contents
of my .scala_dependencies for a test project:
/Users/jgibson/src/workspace/ScalaTB/bin:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/369/1/.cp/lib/scala-library.jar:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/369/1/.cp/lib/scala-dbc.jar:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/369/1/.cp/lib/scala-swing.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar
-------
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala
-------
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Car1.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Car.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Car1$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Marker$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Marker.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Marker.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Person$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Person.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Person.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Vehicle$.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Car.class
/Users/jgibson/src/workspace/ScalaTB/src/scalatb/Vehicle.scala -> /Users/jgibson/src/workspace/ScalaTB/bin/scalatb/Vehicle.class
Leave a comment
on 2010-06-05 14:14 *
By
Whilst this is a bug, it should be noted that .scala_dependencies is a transient file which will be recreated correctly on a clean build, and which should not be checked into a VCS or moved between checkouts.
Updating tickets (#3255, #3262, #3271, #3277, #3279, #3287, #3313, #3317, #3318, #3320, #3329, #1000000, #1000002, #1000004, #1000005, #1000007, #1000011, #1000013, #1000018, #1000019, #1000020, #1000022, #1000023, #1000024, #1000025, #1000026, #1000028, #1000031, #1000033, #1000034, #1000037, #1000039, #1000040, #1000041, #1000057, #1000058, #1000060, #1000061, #1000063, #1000064, #1000065, #1000067, #1000070, #1000073, #1000076, #1000080, #1000082, #1000083, #1000084, #1000085, #1000087, #1000088, #1000089, #1000090, #1000092, #1000093, #1000094, #1000095, #1000097, #1000102, #1000104, #1000106, #1000108, #1000110, #1000111, #1000116, #1000124, #1000126, #1000127, #1000129, #1000132, #1000133, #1000136, #1000139, #1000143, #1000144, #1000145, #1000148, #1000149, #1000152, #1000154, #1000155, #1000157, #1000158, #1000159, #1000161, #1000169, #1000170, #1000172, #1000174, #1000176, #1000178, #1000179, #1000183, #1000185, #1000188, #1000189, #1000192, #1000196, #1000198)