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

fsc keeps old current working directory across compilations #4602

Closed
scabug opened this issue May 17, 2011 · 5 comments
Closed

fsc keeps old current working directory across compilations #4602

scabug opened this issue May 17, 2011 · 5 comments
Milestone

Comments

@scabug
Copy link

@scabug scabug commented May 17, 2011

=== What steps will reproduce the problem (please be specific and use wikiformatting)? ===

  % touch help.scala
  % fsc help.scala
  % mkdir -p new && mv help.scala new
  % cd new
  % fsc help.scala  # this should build help.scala in directory "new" 
  error: source file 'help.scala' could not be found
  one error found
  % mv help.scala ..
  % fsc help.scala  # here help.scala relates to ../help.scala

=== What is the expected behavior? ===

When running fsc from a different directory.. if there is already a scala compiler daemon running then it should inherit the new current working directory of fsc.

=== What do you see instead? ===

When running fsc, if there is no scala compiler daemon running it is run with the current working directory of fsc, but keeps this PWD for all subsequent runs until the daemon exits, even when subsequent fsc invocations are from different directories.

=== What versions of the following are you using? ===

  • Scala: 2.9
  • Java: OpenJDK 1.6.0_22
  • Operating system: Linux 2.6.37
@scabug
Copy link
Author

@scabug scabug commented May 17, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4602?orig=1
Reporter: J (tumeow)
Assignee: @JamesIry
See #6987

Loading

@scabug
Copy link
Author

@scabug scabug commented Apr 6, 2012

Jonathan Clark (jhclark) said:
This caused bizzare errors in the Scala Eclipse IDE plug-in after I moved my project directory for git reasons.

Workaround: "fsc -reset" and then refreshing the project to rebuild it.

Loading

@scabug
Copy link
Author

@scabug scabug commented Jan 17, 2013

@JamesIry said (edited on Jan 17, 2013 4:15:18 PM UTC):
The fix is pretty simple, just be sure to make source file names absolute based on the client's working directory. JamesIry/scala@6744cbb . What's missing from that commit is a good automated test.

Loading

@scabug
Copy link
Author

@scabug scabug commented Jan 28, 2013

Loading

@scabug scabug closed this Jan 28, 2013
@scabug
Copy link
Author

@scabug scabug commented Feb 23, 2013

Jeffrey Schwab (jeff) said:
fsc -reset does not appear to help. Using the file's absolute path works, as does fsc -shutdown.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant