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
Fix ShellCmd String arguments #221
Fix ShellCmd String arguments #221
Conversation
Fixes gregwebs#143. Changelog: - Rework ShellCmd's instances to support String arguments. - Add some tests. - Remove the IncoherentInstances pragma as it's deprecated. - Bump the major version as CmdArg's method has changed. - Bump the resolver to lts-20.04 (the latest as of this writing). - Bump haskell-ci to 0.15.20221107
Looks likes this succeeds for everything but ghc 8.0.2--I'm not sure why because AFAICT the instance selection rules haven't changed. How should I proceed? |
@cunningdefenestrator : Thanks for the PR. |
GHC 8.0 can be considered a legacy GHC by now, so a pragmatic solution would be to drop GHC 8.0. You suggest a major-major version bump to 2.0.0---do you expect a lot of breakage? |
@andreasabel I've sent an invite. If we're being strict about SemVer this deserves a major version bump since I changed the signature of I suspect that re-enabling IncoherentInstances as a top-level pragma might work for GHC 8.0, but given that it's deprecated I think dropping support would be better. |
Conflicts: shelly.cabal
Thanks!
Yes, definitely a major version bump. I it only that
I think if we drop 8.0 then a simple major bump to e.g. |
75c2f81
to
2f750b3
Compare
src/Shelly.hs
Outdated
instance CmdArg Text where toTextArgs = (: []) . id | ||
instance CmdArg String where toTextArgs = (: []) . T.pack | ||
instance {-# OVERLAPPABLE #-} CmdArg a | ||
=> CmdArg [a] where toTextArgs = concatMap toTextArgs |
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.
The removal of toTextArg
breaks my own application of shelly
here: https://github.com/BNFC/bnfc/blob/b2f673649c52cc15d4922d02c8bc23f717249df1/testing/src/ParameterizedTests.hs#L445-L447
tpBnfc :: TestParameters -> FilePath -> Sh ()
tpBnfc params grammar = run_ "bnfc" args
where args = ["-m" <> toTextArg tpMakefile] ++ tpBnfcOptions params ++ [toTextArg grammar]
This is easily fixed, though.
Serokell search https://hackage-search.serokell.io/?q=toTextArg just gives me one relevant hit: pdf-slave-1.3.2.0
with 3 occurrences. However, this bounds shelly < 1.7
so would not be affected.
@cunningdefenestrator : Shouldn't Lines 612 to 615 in d0b16a6
Also, since this is a breaking change, could you draft a migration guide, e.g. on top of the ChangeLog.md file?
|
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.
Remaining:
- question about
Shelly.Pipe
- migration guide
- decide fate of GHC 8.0
- decide on version 1.12 vs. 2.0 (estimate breakage)
- Bump haskell-ci to 0.15.20230128 - Drop support for ghc 8.0.2 - Update changelog
After familiarizing myself with the Haskell PVP, this doesn't justify a major.major bump, so I dropped the version back down to 1.12.0. I've also added a note about migrating existing instances to the changelog, and I dropped support for GHC 8.0. I'll make the corresponding change to |
@andreasabel |
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.
Thanks!
I tested this PR on my local use of shelly and wrote a more concrete migration example based on the changes I made.
Also, since the changelog is for the user of the library (not for our own bookkeeping), I removed entries that are not relevant for the users.
Candidate: https://hackage.haskell.org/package/shelly-1.12.0/candidate Maybe |
1764d41
to
28b25b1
Compare
I reset this branch to remove my last 3 commits pertaining to the release of 1.12.0. |
Fixes #143.
Changelog: