DUB colored output proposal/showcase
gdelazzari
giacky98.mail at gmail.com
Fri Jun 8 13:35:36 UTC 2018
Hello everyone, I'm a new user of the language (I've been playing
around with it for some months) and I'm really liking it.
One minor thing that I didn't particularly like was what (and
how) DUB spits out stuff to the terminal, in the sense that I
find the output a bit difficult to navigate i.e. I can't easily
understand, at a first glance, what's going on. Given that I
tried various languages recently, including their package
manager, and seeing how much clearer their output was, I think
DUB could also be improved in the same way. The main thing that
would make the output clearer would be to color the output and
format it a bit better, IMHO. It would also look way prettier.
Given that this seemed like an easy task, I already implemented a
proof-of-concept just to see how that would look like and, in my
opinion, now it's really clear what's going on. Take a look at
these screenshots:
https://imgur.com/a/3RJyd6m
Some of you will have already noticed... Yes, I got really
inspired by Rust's "Cargo" package manager, but not because I'm a
Rust fanboy or something like that (I don't even particularly
like it as a language), but just because of all the package
managers I tried, Rust's one has been the simplest, cleanest,
approachable and immediate I've ever seen. The way Cargo
organizes and colors the stuff it prints seemed like a really
good approach, so I thought implementing a similar thing (with
some changes/twists) would be a good starting point. Of course
I'm totally open to suggestions and I don't even want Dub to look
exactly like Cargo, at all. However the concept of a colored
"tag" at the beginning of the line looks really cool and useful
in my opinion. All the green tags are related to the building
process, so when your eyes see green you know it's
compiling/linking, while package fetching/upgrading/etc... stuff
has a yellow tag, so you immediately know Dub is doing package
related things just by seeing yellow text. There are other minor
changes, like removing the three dots "..." after every line
(which, IMHO, just clutter the output) and other things.
As I said, this is just a proposal, and I will happily take any
feedback, critiques, enhancements, etc... I also hope this won't
offend anyone, both because I want to change Dub and because I
got inspired by the package manger of a competitor language.
I started this thread to have a discussion on this before
submitting any pull request (which, in the case of this change
being apprecciated, I'll happily take the time to make).
Thanks to anyone in advance,
Giacomo
More information about the Digitalmars-d
mailing list