-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve message when directory is passed dotc. #1556
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
Conversation
@@ -30,7 +30,7 @@ object Formatting { | |||
catch { | |||
case NonFatal(ex) => s"[cannot display due to $ex, raw string = $toString]" | |||
} | |||
case _ => arg.toString | |||
case _ => s"$arg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related/relevant to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not look like it - @olafurpg, could you remove this from the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The NPE that triggered this PR originated from arg
being null so I wrapped it into quasiquotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, however, I still don't think we should be allowing null.show
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's arguably better if this blows up :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine, I've removed the change.
There was a problem hiding this 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 except for the change in Formatting.scala
.
@@ -30,7 +30,7 @@ object Formatting { | |||
catch { | |||
case NonFatal(ex) => s"[cannot display due to $ex, raw string = $toString]" | |||
} | |||
case _ => arg.toString | |||
case _ => s"$arg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not look like it - @olafurpg, could you remove this from the PR?
Previously, running ./bin/dotc <directory> caused a null pointer exception. Now, the error is: error: expected file, received directory 'bin'
I've rebased now. |
Previously, running ./bin/dotc caused a null pointer
exception. Now, the error is:
error: expected file, received directory <directory>