Skip to content
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

Hardcoding absolute paths makes build products unrelocatable #7964

Closed
scabug opened this issue Nov 10, 2013 · 3 comments
Closed

Hardcoding absolute paths makes build products unrelocatable #7964

scabug opened this issue Nov 10, 2013 · 3 comments
Labels

Comments

@scabug
Copy link

scabug commented Nov 10, 2013

I don't know when this happened:

% cat build/pack/partest.properties
#Sun, 10 Nov 2013 05:27:13 -0800

partest.classpath=// one line classpath in reality - broken up for jira
/Users/paulp/.jenkins/workspace/scala-on-demand/build/pack/lib/scala-library.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/build/pack/lib/scala-reflect.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/build/pack/lib/scala-compiler.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/build/pack/lib/scalap.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/build/pack/lib/scala-actors.jar
/Users/paulp/.m2/repository/org/scala-lang/modules/scala-partest_2.11.0-M5/1.0-RC5/scala-partest_2.11.0-M5-1.0-RC5.jar
/Users/paulp/.m2/repository/org/apache/ant/ant/1.8.4/ant-1.8.4.jar
/Users/paulp/.m2/repository/org/apache/ant/ant-launcher/1.8.4/ant-launcher-1.8.4.jar
/Users/paulp/.m2/repository/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar
/Users/paulp/.m2/repository/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar
/Users/paulp/.m2/repository/org/scalacheck/scalacheck_2.11.0-M5/1.10.1/scalacheck_2.11.0-M5-1.10.1.jar
/Users/paulp/.m2/repository/org/scala-tools/testing/test-interface/0.5/test-interface-0.5.jar
/Users/paulp/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.11.0-M5/1.0-RC2/scala-parser-combinators_2.11.0-M5-1.0-RC2.jar
/Users/paulp/.m2/repository/org/scala-lang/modules/scala-xml_2.11.0-M5/1.0-RC4/scala-xml_2.11.0-M5-1.0-RC4.jar
/Users/paulp/.m2/repository/org/scala-lang/scalap/2.11.0-M5/scalap-2.11.0-M5.jar
/Users/paulp/.m2/repository/org/scala-lang/modules/scala-xml_2.11.0-M4/1.0-RC3/scala-xml_2.11.0-M4-1.0-RC3.jar
/Users/paulp/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.11.0-M4/1.0-RC1/scala-parser-combinators_2.11.0-M4-1.0-RC1.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/build/pack/lib/scala-partest-extras.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/build/pack/lib/scala-partest-javaagent.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/test/files/lib/annotations.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/test/files/lib/enums.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/test/files/lib/genericNest.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/test/files/lib/jsoup-1.3.1.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/test/files/lib/methvsfield.jar
/Users/paulp/.jenkins/workspace/scala-on-demand/test/files/lib/nest.jar

That is the generated "partest.properties" from my jenkins. It seems that test/partest takes its classpath from this file. The result is that the build directory is coupled to the path at which it was built, and if you rsync it to some other machine partest will die immediately failing to find any classes.

I've taken advantage of this ability for years and it would be nice to keep it. Hardcoding absolute paths into files is almost never the right thing in any case.

@scabug
Copy link
Author

scabug commented Nov 10, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7964?orig=1
Reporter: @paulp

@scabug
Copy link
Author

scabug commented Nov 10, 2013

@retronym said:
An alternative would be to copy those JARs under ./build and reference them relatively. We do this already for ./build/deps (so I could reference them relatively in IntelliJ classpaths), so we might be able to use that.

@SethTisue
Copy link
Member

presumably not an issue anymore after ant->sbt change?

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

No branches or pull requests

3 participants