Skip to content
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

-explain-types generates far too much output #38

Closed
DavidGoodenough opened this issue May 10, 2021 · 2 comments · Fixed by #51
Closed

-explain-types generates far too much output #38

DavidGoodenough opened this issue May 10, 2021 · 2 comments · Fixed by #51

Comments

@DavidGoodenough
Copy link

DavidGoodenough commented May 10, 2021

I was trying to upgrade a project from scala-2 to -3, and having to do it manually (scala3-migrate was gagging on ScalaFX code). The compiler was generating so much output (from code that compiled totally cleanly in Scala-2) and the explain-types code is so large compared to the actual error messages that I could not use a full screen console to see more than 1 error per scroll, and I think (unproven) that this was taking so long to generate and send that when metals trys to start sbt it times out.

I know the compiler is trying to be helpful, but one does need to be able to see the wood for the trees!

Please remove this option (at least for now) along with -explain (both seen to be needed to be removed to clean up the output)

@DavidGregory084
Copy link
Member

DavidGregory084 commented May 21, 2021

I don't have any objection @DavidGoodenough but I'd be interested to see if this opinion is more widely held. Perhaps we should ask on Scala Users?

In the meantime you can always do this in build.sbt:

scalacOptions ~= { opts => opts.filterNot(_.startsWith("-explain")) }

@SethTisue
Copy link
Member

SethTisue commented Sep 1, 2021

I really don't think this flag was ever intended to be on by default, for anybody.

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 a pull request may close this issue.

3 participants