-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Uncatched case in file existence check of SourceFile #14664
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
Comments
@chikei could you provide a minimized example when this actually breaks the compiler without references to an external project? |
|
Does this mean a scala repl example do not count as minimized example ? |
Sorry, I accidentally assigned you again. However your example still looks like a quite exotic corner case because you're modifying your scala installation in some way and this should not be done by users. Similarly if you renamed |
I think if you have a local file or dir that breaks the class path, then it's on the user. The scripts for starting the compiler or a REPL from the command line are inherently fragile. I expected the reproducer to be the thing where there is a local file or dir shadowing a package name such as There was a Scala 3 issue about how the REPL handles local filesystem. That was fixed. Here is a current difference between 2/3:
I see this is actually totally different.
I wonder what is the behavior under a different compilation regime? i.e., |
Looking up the stack, I see the OP is correct,
Now that I see it, I vaguely remember the ancient note that |
Compiler version
3.0.0 and 3.1.0
Minimized code
here and here (and I believe later is what occurs in this Ammonite issue) assumes JVM always throw
NoSuchFileException
when path is not exist, but that's not the case under linux if 1. path start with directory and 2. the directory name exists in filesystem as a filethe code assumed:
or
and the uncatched case:
The text was updated successfully, but these errors were encountered: