8000 Fixed destination path for foreign-module setup by ak0rz · Pull Request #912 · com-lihaoyi/mill · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixed destination path for foreign-module setup #912

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

Merged
merged 1 commit into from
Jun 7, 2020

Conversation

ak0rz
Copy link
Contributor
@ak0rz ak0rz commented May 31, 2020

A tiny fix resolving miss of appropriate destination directory for foreign modules that causes following error:

Exception in thread "main" java.nio.file.NoSuchFileException: /Users/goodfella/dev/out/baz/compile/meta.json
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
        at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:375)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:426)
        at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
        at java.base/java.nio.file.Files.newInputStream(Files.java:160)
        at ujson.Readable$$anon$1.transform(Readable.scala:20)
        at ujson.package$.transform(package.scala:4)
        at ujson.package$.read(package.scala:9)
        at mill.main.RunScript$.$anonfun$evaluate$6(RunScript.scala:243)
        at scala.collection.immutable.List.map(List.scala:246)
        at scala.collection.immutable.List.map(List.scala:79)
        at mill.main.RunScript$.evaluate(RunScript.scala:237)
        at mill.main.RunScript$.$anonfun$evaluateTasks$1(RunScript.scala:188)
        at scala.util.Either.map(Either.scala:382)
        at mill.main.RunScript$.evaluateTasks(RunScript.scala:187)
        at mill.main.RunScript$.$anonfun$runScript$4(RunScript.scala:66)
        at ammonite.util.Res$Success.flatMap(Res.scala:62)
        at mill.main.RunScript$.runScript(RunScript.scala:65)
        at mill.main.MainRunner.$anonfun$runScript$1(MainRunner.scala:115)
        at mill.main.MainRunner.watchLoop2(MainRunner.scala:64)
        at mill.main.MainRunner.runScript(MainRunner.scala:90)
        at mill.MillMain$.main0(MillMain.scala:239)
        at mill.MillMain$.main(MillMain.scala:30)
        at mill.MillMain.main(MillMain.scala)

Module baz is actually a foo.bar.baz, that was imported as a $file to root build.sc.
This PR resolves resolution of baz targets destination to the /Users/goodfella/dev/out/foreign-modules/foo/bar/baz/*

@ak0rz
Copy link
Contributor Author
ak0rz commented Jun 4, 2020

@lefou kind reminder for this little effort :)
I'm really into this change right now.
If you have something against - please, let me know and I'll try to fix any issues around it.

Copy link
Member
@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me I think. It would be great to have a test for this, as I currently have no setup to validate. But that is no blocker for merging IMHO. @lihaoyi WDYT?

@lihaoyi
Copy link
Member
lihaoyi commented Jun 7, 2020

@lefou I don't actually know much about foreign modules, but I figure if @ya-goodfella says it fixes his problem then that's good enough for now

@lihaoyi lihaoyi merged commit ef71368 into com-lihaoyi:master Jun 7, 2020
@lefou lefou added this to the after 0.7.3 milestone Jun 7, 2020
@lefou
Copy link
Member
lefou commented Jun 7, 2020

Thanks for the fix!

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

Successfully merging this pull request may close these issues.

3 participants
0