-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove duplication from UserFacingPrinter
#3032
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
Remove duplication from UserFacingPrinter
#3032
Conversation
I probably won't have time to review this week, you may want to ask someone else.
The less stuff we have the better it is I think, if a separate printer is needed for the REPL it needs to be well justified. Also in e331f87 you put |
project/Build.scala
Outdated
) | ||
}.evaluated, | ||
|
||
repl := run.evaluated, |
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.
Missing a definition repl :=
in dotty-compiler now.
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.
Fixed in #3026 :)
fd124b7
to
3e4f2c7
Compare
As discussed with Guillaume Martres, this has the effect that if you depend on dotty-compiler version X, you also get the appropriate dotty repl with the same version
c922ea6
to
1d1a0e8
Compare
1d1a0e8
to
f7e9af9
Compare
It's great to have these things merged together, LGTM! |
import NameOps._, StdNames._, Decorators._, Scopes.Scope, Types._, Texts._ | ||
import SymDenotations.NoDenotation, Symbols.{ Symbol, ClassSymbol, defn } | ||
|
||
class UserFacingPrinter(_ctx: Context) extends RefinedPrinter(_ctx) { |
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.
Do you use _ctx
because ctx
is already defined in RefinedPrinter
?
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.
Yes and that's what we do in RefinedPrinter when extending plain printer :)
@@ -18,7 +18,6 @@ val `dotty-bench-bootstrapped` = Build.`dotty-bench-bootstrapped` | |||
val `scala-library` = Build.`scala-library` | |||
val `scala-compiler` = Build.`scala-compiler` | |||
val `scala-reflect` = Build.`scala-reflect` | |||
val `dotty-repl` = Build.`dotty-repl` |
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 it intentional to keep the dotty-repl
project in Build.scala?
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 like an oversight when rebasing.
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.
(Remove it in #3044)
@smarter: how far do we want to take this? Should I try to get rid of
UserFacingPrinter
completely?I think there might be some things that won't print as expected if we do that. But I could try, anyway - up to you.