haskell-hvr / regex-tdfa

Pure Haskell Tagged DFA Backend for "Text.Regex" (regex-base)
http://hackage.haskell.org/package/regex-tdfa
Other
36 stars 9 forks source link

bytestring 0.12 #54

Closed andreasabel closed 1 year ago

andreasabel commented 1 year ago
andreasabel commented 1 year ago

Pushed to master in 771ac3badadc4d34002be26916b0acd11509d0f5

phadej commented 1 year ago

Same question as with cassava, parsec depends on text and neither allow bytestring-0.12. Have you tested that they work?

andreasabel commented 1 year ago

I tested with constraints: bytestring >= 0.12 and allow-newer: bytestring locally.
cabal-plan fingerprint shows just one entry for bytestring:

<hash> G bytestring-0.12.0.0

I concluded this was enough evidence.

I could have added a constraint-set for bytestring-0.12 to the CI, but now I realize that this only checks the build, but does not run the tests: https://github.com/haskell/base64-bytestring/pull/50/files#r1257414879 Is there a way to instrument the constraint-set step to also run the tests?

phadej commented 1 year ago

Is there a way to instrument the constraint-set step to also run the tests?

https://github.com/haskell-CI/haskell-ci/blob/782c6f634b44ccd8f55c60d8058673bdfc176e23/cabal.haskell-ci#L106-L115

andreasabel commented 1 year ago

Thanks for the pointer, @phadej!

Unfortunately, constraint-set does not recognise allow-newer, is there a way to place allow-newer: bytestring in the cabal.project for the constraint-set?

phadej commented 1 year ago

Unfortunately, constraint-set does not recognise allow-newer

And I don't see a reason to make it.

Add allow-newer to the whole cabal.project. The bytestring is pinned to installed version by the step building with bundled libraries, and then the constraint set will build separately. (Or if the library weren't boot library, you probably should have constraint sets for various major versions anyway to ensure that the old one is tested when support elsewhere catches up, and then cabal-install won't pick old one if not explicitly asked for).

andreasabel commented 1 year ago

One reason could be that users might expect to be able to place a allow-newer there. Another one, as you hint, is that a raw-project allow-newer:foo affects also the vanilla builds, if foo isn't constrained otherwise.

Older versions can be conveniently tested with a CI based on stackage snapshots, complementing the Haskell CI.

In #55 now I turned your advice into a constraint-set for bytestring-0.12.