-
-
Notifications
You must be signed in to change notification settings - Fork 379
Show colored error messages for the run.dlang.io backend #1981
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
base: master
Are you sure you want to change the base?
Conversation
That cyan looks pretty bad on white. Maybe a blue instead. Doesn't really matter to me, as long as it has more contrast. |
Do we really need to add another HTTP request for that CSS file? |
8c8b9ca
to
edfd887
Compare
No. Included into |
62a9763
to
463c8b0
Compare
Thanks. Keeping things in separate files would be more amenable if they were concatenated during the build, but even so, I'm not sure it's worth it. |
Honestly, I think doing the ANSI->HTML translation ought to be done by the server. There is no value in sending raw ANSI over the wire, as far as I can see. |
But I do agree that adding the ansi JS increases the size of the sources needed for dlang.org :/ |
463c8b0
to
5f8f406
Compare
bbd989c
to
4d28b0d
Compare
4d28b0d
to
07f0c2b
Compare
07f0c2b
to
01a7f3a
Compare
On a second thought, I'm not planning on adding this HTML output to the backend for the reasons from above (security:holes for injecting arbitrary HTML + simplicity: I didn't know of any D ANSI 2 HTML implementation. There are plenty in JS). |
I'm not going to block this PR, but I still don't like this. DMD uses a very tiny subset of ANSI, parsing which should be absolutely trivial by hand. This both puts under the question of including an entire library someone else has written, and the argument that doing it on the server is too hard. |
Pretty horrible JS magic as most of the previous output from DPaste isn't supported, but it's not a huge deal as the user is either just interested in the normal output or the error message.
In a follow-up, I might also add support for colored error messages like run.dlang.io has