Uh oh!
There was an error while loading. Please reload this page.
Put back ui json check - #48684
Conversation
There was a problem hiding this comment.
-Zui-testing was lost during revert.
There was a problem hiding this comment.
It doesn't work at all. Whatever I try to do, I always end with empty stderr so I'll keep my code for the moment.
There was a problem hiding this comment.
Ah nevermind, I didn't update correctly...
petrochenkov
commented
Mar 3, 2018
zackmdavis
commented
Mar 3, 2018
@GuillaumeGomez I think I got the restoration of |
There was a problem hiding this comment.
While this does successfully implement #48041, it seems rather ad hoc to make a show_explain method be part of the contract of the Emitter trait. (In contrast to how it makes sense for all Emitters to have an emit method, because that's what being an Emitter is all about.) Can we implement this in a more generalizable way?
Two potential alternatives that come to mind:
- Make the
Emittertrait have adestinationmethod that exposes something we can write arbitrary lines to, and use it to write the--explainusage message inabort_if_errors.JsonEmitter'sdstfield is of typeBox<Write + Send>, andEmitterWriter'sDestinationimplementsWriteand the field of all three of its variants implementSend(visible in the source in the case ofBufferedTerminalandRaw, and thetermdocs say thatStderrTerminalisSend), so I think the types should check out.
- Implement the
--explainmessage as aDiagnostic, adding a plainer formatting mode toDiagnosticif necessary.
There was a problem hiding this comment.
As I mentioned in passing at the end of a previous comment, Handleralready knows what what codes we've emitted; JsonEmitter shouldn't have to know this.
There was a problem hiding this comment.
Oh indeed. I'll remove this add.
There was a problem hiding this comment.
(If we end up needing to regenerate the UI test expectations anyway in the course of this PR, then we might as well also update the language (and use backticks) at the same time; but if not, then we can continue leave those tasks to #48559.)
bors
commented
Mar 3, 2018
☔ The latest upstream changes (presumably #48586) made this pull request unmergeable. Please resolve the merge conflicts. |
GuillaumeGomez
commented
Mar 3, 2018
@petrochenkov: Reverting seems like way too much troubles... |
d61877f to
1975eb4CompareGuillaumeGomez
commented
Mar 3, 2018
This new way of handling things will certainly please you more. :) |
1975eb4 to
4c5adcfComparebors
commented
Mar 4, 2018
☔ The latest upstream changes (presumably #48125) made this pull request unmergeable. Please resolve the merge conflicts. |
7c371ad to
8a6f0a2Comparebors
commented
Mar 4, 2018
☔ The latest upstream changes (presumably #47832) made this pull request unmergeable. Please resolve the merge conflicts. |
bcf99f3 to
ef6dbb1Compare46dc072 to
5a48d31CompareGuillaumeGomez
commented
Mar 13, 2018
@petrochenkov: Tests (finally) passed. |
There was a problem hiding this comment.
Last thing: removing this trailing empty line and the empty line after "Some errors occurred...", then we'll land this with higher priority.
5a48d31 to
c203cbbCompareGuillaumeGomez
commented
Mar 13, 2018
@petrochenkov: Done as well, but let's wait for CI confirmation first. |
43bda9a to
6c673efCompare6c673ef to
2e104a7CompareGuillaumeGomez
commented
Mar 13, 2018
@petrochenkov: New tests are being added all the time. T_T |
petrochenkov
commented
Mar 14, 2018
@bors r+ p=1 |
bors
commented
Mar 14, 2018
📌 Commit 2e104a7 has been approved by |
bors
commented
Mar 14, 2018
…chenkov Put back ui json check r? @petrochenkov
bors
commented
Mar 14, 2018
☀️ Test successful - status-appveyor, status-travis |
r? @petrochenkov