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

classpath includes '.' whether you like it or not #4857

Closed
scabug opened this issue Jul 31, 2011 · 5 comments
Closed

classpath includes '.' whether you like it or not #4857

scabug opened this issue Jul 31, 2011 · 5 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jul 31, 2011

package foo {
  object Test {
    def main(args: Array[String]): Unit = {
      println("It's us chickens")
    }
  }
}
% scalac3 ./a.scala
% scala3 -cp /nobody-here-but-us-chickens foo.Test
It's us chickens

% scala3 -Ylog-classpath -cp /nobody-here-but-us-chickens foo.Test
[snip]
After java boot/extdirs classpath has 1 entries:
  directory classpath: .
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jul 31, 2011

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 6, 2011

Commit Message Bot (anonymous) said:
(extempore in r25452) Attacked classpaths to get "." off of it when it's not actually
specified. The commit makes me nervous, but there's no invisible way to
fix something like this.

** Attention, this commit changes classpath handling **

We desperately need some way of testing that the classpath has
certain qualities and does not have others; partest is not that way.
Closes #4857, no review.

@scabug scabug closed this Aug 6, 2011
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 13, 2011

@SethTisue said:
Ow, this bit me today. Is there a workaround? (And if there's a list somewhere of candidates for inclusion in 2.9.2, I hope this is on it.)

Note that scaladoc is affected too.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 13, 2011

@SethTisue said:
In addition to being a correctness problem, this is also a performance problem in that it can potentially take a long time for the compiler to recursively descend the entire subtree of the current directory, looking for any and all class files.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 13, 2011

@SethTisue said:
fwiw, in the case of Scaladoc I was able to work around this by patching my local copy of the scaladoc shell script to pass -Dscala.usejavacp=false instead of -Dscala.usejavacp=true (it isn't enough to override it in JAVA_OPTS since that comes earlier in the command line)

@scabug scabug added this to the 2.10.0-M7 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.