faylang / fay

A proper subset of Haskell that compiles to JavaScript
https://github.com/faylang/fay/wiki
BSD 3-Clause "New" or "Revised" License
1.29k stars 86 forks source link

optparse-applicative 0.6 #342

Closed snoyberg closed 10 years ago

bergmark commented 10 years ago

Thank you thank you!

bergmark commented 10 years ago

@snoyberg haskell-packages-0.2.3.1 depends on optparse-applicative >= 0.6, and previous versions don't have an upper bound. I can either bump fay to optparse-applicative >= 0.6. or I can ask Roman to CPP this into haskell-packages, but then you could only safely build with that version of haskell-packages and later. Do you have a preference?

bergmark commented 10 years ago

Ehm, I could flag this in the cabal file as well, so I'll do that for now.

bergmark commented 10 years ago

This should be okay. Now it will only break if you explicitly try to build with optparse-applicative == 0.6.* and haskell-packages < 0.2.3.1.

snoyberg commented 10 years ago

I already sent Roman a patch with CPP for one of his other packages (tasty), and he rejected it since he doesn't want to clutter his code with CPP. I personally think this is a mistake, specifically because it causes problems like the ones here. I'm OK with fay have a lower bound on optparse-applicative 0.6 as well if you like, my default approach is just to always use CPP to avoid cascading build dependency problems.

bergmark commented 10 years ago

I'll keep the CPP for now. If fay or haskell-names bumps the dependency on haskell-packages the CPP won't be necessary so I can remove it then.

I dislike CPP for the cluttering too, and it's hard to remember to test the non-default cases. But I'm fine with it in this case.

bergmark commented 10 years ago

This caused the build to fail for users (incl travis) that had an older mtl (resulting in it picking the old haskell-packages but new optparse). I ended up the dep on bumping optparse. It's released as fay 0.18.0.1.