Skip to content

IOException when output directory is missing #3071

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

Closed
allanrenucci opened this issue Sep 5, 2017 · 0 comments
Closed

IOException when output directory is missing #3071

allanrenucci opened this issue Sep 5, 2017 · 0 comments

Comments

@allanrenucci
Copy link
Contributor

> dotc -d out Foo.scala
java.io.IOException: No such file or directory
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:1012)
	at dotty.tools.io.AbstractFile.fileOrSubdirectoryNamed(AbstractFile.scala:236)
	at dotty.tools.io.AbstractFile.fileNamed(AbstractFile.scala:247)
	at scala.tools.nsc.backend.jvm.BytecodeWriters.getFile(BytecodeWriters.scala:35)
	at scala.tools.nsc.backend.jvm.BCodeHelpers.getFileForClassfile(BCodeHelpers.scala:38)
	at dotty.tools.backend.jvm.GenBCodePipeline$Worker1.visit$$anonfun$1(GenBCode.scala:217)
	at scala.Option.foreach(Option.scala:257)
	at dotty.tools.backend.jvm.GenBCodePipeline$Worker1.visit(GenBCode.scala:219)
	at dotty.tools.backend.jvm.GenBCodePipeline$Worker1.run(GenBCode.scala:152)
	at dotty.tools.backend.jvm.GenBCodePipeline.buildAndSendToDisk(GenBCode.scala:367)
	at dotty.tools.backend.jvm.GenBCodePipeline.run(GenBCode.scala:333)
	at dotty.tools.backend.jvm.GenBCode.run(GenBCode.scala:54)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$2(Phases.scala:283)
	at scala.collection.immutable.List.map(List.scala:284)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:285)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1$$anonfun$1(Run.scala:81)
	at scala.compat.java8.JProcedure1.apply(JProcedure1.java:18)
	at scala.compat.java8.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:89)
	at scala.compat.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:94)
	at dotty.tools.dotc.Run.compileSources(Run.scala:63)
	at dotty.tools.dotc.Run.compile(Run.scala:47)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:26)
	at dotty.tools.dotc.Driver.process(Driver.scala:124)
	at dotty.tools.dotc.Driver.process(Driver.scala:93)
	at dotty.tools.dotc.Driver.process(Driver.scala:105)
	at dotty.tools.dotc.Driver.main(Driver.scala:132)
	at dotty.tools.dotc.Main.main(Main.scala)

dotc should emit a proper error message like scalac

> scalac -d out Foo.scala
scalac error: out does not exist or is not a directory
  scalac -help  gives more information
esarbe added a commit to esarbe/dotty that referenced this issue Sep 13, 2017
esarbe added a commit to esarbe/dotty that referenced this issue Sep 16, 2017
esarbe added a commit to esarbe/dotty that referenced this issue Sep 16, 2017
esarbe added a commit to esarbe/dotty that referenced this issue Sep 20, 2017
esarbe added a commit to esarbe/dotty that referenced this issue Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant