-
Notifications
You must be signed in to change notification settings - Fork 36
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
Make text an optional dependency #202
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice hack! 😈 I'm curious what @quchen will say! ;)
I'd like to see:
- Brief explanatory module headers for the contents of
src-text
. - CI with
-text
. I think this can be achieved with ahaskell-ci
constraint set.
Also, I hope that there are no expectations that |
I'm happy to supply CI config and additional comments and whatever :) if @quchen approves this approach. There is also an option to separate |
Wow, this is some hack. If it helps adoption, I’m in favor. I think you should add documentation for the very much non-intuitive new modules, a simple paste of the ticket’s description as Haddock should suffice. It’s also important that this does not show up the official Haddock documentation or in standard builds, but that shouldn’t be the case by default anyway, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! A few more wibbles…
The previous CI run had timed out for some reason. I've restarted it now. |
This reverts commit f69d53a.
@sjakobi There appears to be a subtle issue with Stack support of internal libraries: while Otherwise this is ready for a final review, I believe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @Bodigrim! :) I'll try to start working on a release this week. |
I should have raised an issue first, but it is easier to demonstate what I'm proposing with a PR. I'm fine to have it closed/rejected, if we find it unpalatable.
I very much understand that it's a core value of
prettyprinter
to useText
and notString
. However, there are cases when you cannot afford it: namely, when you are atext
(orbytestring
) developer ;) or work with a very bleeding-edge GHC. If in futureansi-wl-pprint
(already deprecated) is to extinct and be replaced byprettyprinter
in dependencies ofoptparse-applicative
,tasty
andtest-framework
, developers of low-level packages would have to deal with pretty nasty build dependencies. E. g., to runbytestring
tests you'd have to rebuildtext
, thenprettyprinter
, thenoptparse-applicative
, thentasty
and all its providers. This is extremely disheartening, as I can tell from earlier experience.I was interested to check how difficult is to make
prettyprinter
fallback toString
, iftext
is not available. It seems that just couple of lines and a Cabal flag would suffice. How do you feel about this?