-
Notifications
You must be signed in to change notification settings - Fork 222
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
feat: Add option to output colors #2251
Conversation
@aljazerzen given you're quasi-out for two weeks, give this a thumbs-down if you want me to wait — e.g. the options aren't named well — otherwise I'll merge. (better to wait than revert) |
Could it be listed in the Changelog? (Downstream packages also need to add the new field to Options) |
Definitely, will do More generally, if there's some check we could add — e.g. anything with a |
Including breaking change note
FYI this was resolved in #2267 |
This moves #1355 forward, and enables a PR to add colors to the book. The main thing to review is whether the proposed structure and naming of the options is reasonable.
On the names — it's not that consistent — we havesignature_comment
— should this just becolors
rather thanuse_colors
? Or doessignature_comment
suggest it contains an actual comment? I've generally tried to make bools self-describing, but possible an options struct can be more implicit.Edit: this is now just a
color
property and.with_color(self, color)
method, consistent with something like https://github.com/zesterer/ariadne/blob/ccd465160129d2546d67f7ee78727a4098a64330/src/lib.rs#L81. Possibly we should standardize around something like thatIt's slightly different from the proposal in #1355 — it doesn't introduce another layer of options.
Options
struct to thecompile
function, which we now already do.I'm not completely clear how we support colors in
prqlc
now...false
to thecomposed
method, which is passed through to ariadne herecolor_eyre::install
usage auto configures it?false
doesn't pass through to ariadne?This doesn't implement support in bindings yet.