bmjames / scala-optparse-applicative

Scala port of Paolo Capriotti's optparse-applicative library. This repository is no longer maintained; newer versions exist in this fork: https://github.com/xuwei-k/optparse-applicative
BSD 3-Clause "New" or "Revised" License
72 stars 9 forks source link

Wish: remove dependence on Kiama #7

Closed shajra-cs closed 7 years ago

shajra-cs commented 8 years ago

My current company for very social (not rigorously technical/legal) reasons is uncomfortable with the LGPL license pulled in by Kiama.

It doesn't seem like Kiama is used too much by this project, and something hand-rolled might be possible -- maybe at the loss of some performance or generality -- but this is just a command-line parsing tool, so hopefully it's not that big a deal.

If someone else (me) put in the work, would you be open to getting off of Kiama?

bmjames commented 8 years ago

I'd prefer not to lose the generality of the pretty-printing combinators, because that might make it harder to port future changes from the Haskell library, or to make any other changes that are desirable.

I'd be open to merging in a minimal pretty-printing library containing just the combinators we do use, if it was a general enough foundation to expand on if necessary, without needing to unpick much specialised code. Performance is of no great concern to me.

tpolecat commented 7 years ago

👍 yeah it also pulls in a bunch of other dependencies. I was just trying to pull this lib up to 2.12 and it's blocked on Kiama, which may in turn be blocked on other stuff. If they don't get a 2.12 release out shortly I may look into slicing it off.

coltfred commented 7 years ago

Has anyone started this work? I might give a naive port of the Wadler paper a try if no one is close to a solution.

tpolecat commented 7 years ago

I wonder if scala.text would get us what we need? It's deprecated but still in 2.12 so we're ok for a while. Worst case could copy-paste the source when it goes away for good.

coltfred commented 7 years ago

@tpolecat It really depends how set on the exact same spacing @bmjames is. I've almost completed a simple version of what Kiama is based on. We'll see if that works and what @bmjames thinks of it. :laughing:

coltfred commented 7 years ago

This was closed by #13. @bmjames Can we get a release with the Kiama dependency removed?

bmjames commented 7 years ago

Sure, I have been intending to make one but I haven't got round to it yet. I'll close this issue once the release is done.