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

option to reverse the order of compile error messages #9729

Closed
scabug opened this issue Mar 31, 2016 · 7 comments
Closed

option to reverse the order of compile error messages #9729

scabug opened this issue Mar 31, 2016 · 7 comments

Comments

@scabug
Copy link

@scabug scabug commented Mar 31, 2016

I just had this idea while scrolling upwards in my terminal to find the first compile error:
It would be nice to have the option to print the compile errors in reverse order, then one sees the most relevant error at a first glance. This would be especially helpful when using sbt ~compile.

@scabug
Copy link
Author

@scabug scabug commented Mar 31, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9729?orig=1
Reporter: Felix Dietze (man)

@scabug
Copy link
Author

@scabug scabug commented Mar 31, 2016

@som-snytt said:
What a great idea. I'm currently doing the scroll dance. Alternatively, an option to limit error output. Both goals are achievable with a custom reporter.

Maybe we could change the priority from "trivial" to "life-changing".

@scabug
Copy link
Author

@scabug scabug commented Jan 25, 2017

Richard Bradley (richard.bradley) said (edited on Jan 25, 2017 10:44:47 AM UTC):
This sounds like an sbt feature to me, rather than a scalac feature.

This is also a little risky -- to print the errors in reverse order, you'd have to buffer them all in memory until the compile run finished. If the process crashed or was killed, then you'd lose all diagnostic info. The current approach of printing errors as soon as they occur at least means that the compiler can be killed without losing info if the user doesn't want to wait for the run to finish.

@scabug
Copy link
Author

@scabug scabug commented Jan 25, 2017

@som-snytt said (edited on Jan 25, 2017 6:29:02 PM UTC):
There's also -Xprompt.

Another idea is a reporter that summarizes with: "The first error was...".

@scabug
Copy link
Author

@scabug scabug commented Jan 31, 2017

@som-snytt said (edited by @lrytz on Feb 3, 2017 3:45:04 PM UTC):
scala/scala#5667 introduces -Xmaxerrs / -Xmaxwarns

@scabug
Copy link
Author

@scabug scabug commented Feb 11, 2017

@SethTisue said:
I agree with Richard's comments. And in general, I'm leery of trying to please all people with a proliferation of compiler options for having it your own way, each one seems like a good idea, but the maintenance burden, doc burden, mental "what flags am I running under?" burden, downstream tooling needing to adjust burden, etc – all of this piles up.

Andrew's improvement (now merged!) is a nice one, especially given the javac precedent.

@scabug scabug closed this Feb 11, 2017
@scabug
Copy link
Author

@scabug scabug commented Feb 11, 2017

@SethTisue said:
Thinking about ways of addressing the underlying issue here would make an interesting thread on contributors.scala-lang.org, maybe one or more further tickets and/or PRs would come out of it.

@scabug scabug added this to the Backlog milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.