-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Running mill
in source directory causes subsequent tasks to fail
#823
Comments
Thanks for reporting and providing a reproduction. After a first glace, I think it's because mill creates a socket file under |
I just got caught out by this. Accidentally ran mill deep down in a source directory, then spent 10-15 minutes trying to figure out why mill was generating such a cryptic error before stumbling on this issue. Putting my stack trace here so it's easier for others to find when searching issues:
|
I'm not sure what the best approach is to solve this issue. Maybe we should filter out socket files when searching for source files? Or vice versa, explicitly only collect "real" files? |
I don't know the internals of mill very well, but I wonder if it would be possible to abort early if no build file can be found and simply not write anything in that case? |
Yeah, exiting mill with a good message in case a |
HelloWorld.sources java.nio.file.FileSystemException: /Users/.../MillTest1/HelloWorld/src/main/scala/hello/out/mill-worker-dRTtqvVZYalRvhruw0ZliMCsBnA=-1/io: Operation not supported on socket I encountered the same problem, can anyone help me? |
Just remove the |
PR #1878 fixes this. |
When creating a `PathRef` of a path that contains socket files, which is for example the case if the path contains the `out` directory of Mill, Mill is failing because it can't read the socket file to calculate the content digest. We already skip digesting of unreadable files but somehow those socket files are not marked as unreadable. There is no performant and platform neutral way to detect socket files, so this PR just catches the typical `FileSystemException` at `InputStream` creation time and gracefully handles it (like other unreadable files) by just ignoring its content. * Fix #1875 * Fix #823 Pull request: #1878
Reproduction can be found here.
I've not tested on a different computer or OS.
The text was updated successfully, but these errors were encountered: