Skip to content

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

Merged
merged 4 commits into from
Aug 31, 2017

Conversation

felixmulder
Copy link
Contributor

@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.

@felixmulder felixmulder requested a review from smarter August 29, 2017 07:33
@smarter
Copy link
Member

smarter commented Aug 29, 2017

I probably won't have time to review this week, you may want to ask someone else.

how far do we want to take this? Should I try to get rid of UserFacingPrinter completely?

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 @smarter in the commit message which means that everytime you re-push this commit I get an email, please avoid that :).

)
}.evaluated,

repl := run.evaluated,
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #3026 :)

@felixmulder felixmulder force-pushed the topic/harmonize-printers branch 2 times, most recently from fd124b7 to 3e4f2c7 Compare August 29, 2017 09:33
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
@felixmulder felixmulder force-pushed the topic/harmonize-printers branch 3 times, most recently from c922ea6 to 1d1a0e8 Compare August 29, 2017 14:16
@OlivierBlanvillain
Copy link
Contributor

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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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 :)

@felixmulder felixmulder merged commit 82dfb6c into scala:master Aug 31, 2017
@@ -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`
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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 smarter mentioned this pull request Aug 31, 2017
@allanrenucci allanrenucci deleted the topic/harmonize-printers branch December 14, 2017 19:25
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