kim / opentracing

OpenTracing (https://opentracing.io) for Haskell
Apache License 2.0
40 stars 12 forks source link

Bump base minimum constraint to 4.12? #47

Closed philderbeast closed 1 year ago

philderbeast commented 1 year ago

I tried 1e130d04efe49820a5658dae12c6f529f962f663 with low versions of GHC to find the minimum version I could compile with and that was ghc-8.6.1. I had this problem compiling with ghc-8.4.4:

$ cabal build all --enable-tests --enable-benchmarks
Resolving dependencies...
Build profile: -w ghc-8.4.4 -O1
...
Data/Vinyl/ARec/Internal.hs:159:3: error:
    • Illegal polymorphic type:
        forall s. Int -> SmallMutableArray s -> ST s ()
      Perhaps you intended to use RankNTypes or Rank2Types
    • In the definition of data constructor ‘ARecBuilder’
      In the newtype declaration for ‘ARecBuilder’
    |
159 |   ARecBuilder ( forall s.
    |   ^^^^^^^^^^^^^^^^^^^^^^^...
Error: cabal: Failed to build vinyl-0.14.3 (which is required by
exe:opentracing-example-simple from opentracing-examples-0.2.0 and
exe:opentracing-example-rpc from opentracing-examples-0.2.0). See the build
log above for details.

Should we bump the base minimum constraint like this?

-    , base  >= 4.9 && < 4.17
+    , base  >= 4.12 && < 4.17

Same story for 64fd0651c48844c8c40b790a6909c0ef4aea3382, the commit hash for the 0.2.2 tag.

philderbeast commented 1 year ago

If we do this then we can get rid of two dependencies, flagged by -Wunused-packages:

$ cabal build all --enable-tests --enable-benchmarks
Build profile: -w ghc-9.4.5 -O1
In order, the following will be built (use -v for more details):
 - opentracing-0.2.2 (lib) (first run)
 - opentracing-zipkin-common-0.2.2 (lib) (first run)
 - opentracing-wai-0.2.2 (lib) (first run)
 - opentracing-jaeger-0.2.2 (lib) (first run)
 - opentracing-http-client-0.2.2 (lib) (first run)
 - opentracing-zipkin-v2-0.2.2 (lib) (first run)
 - opentracing-zipkin-v1-0.2.2 (lib) (first run)
 - opentracing-examples-0.2.0 (lib) (first run)
 - opentracing-examples-0.2.0 (exe:opentracing-example-simple) (first run)
 - opentracing-examples-0.2.0 (exe:opentracing-example-rpc) (first run)
Configuring library for opentracing-0.2.2..
Preprocessing library for opentracing-0.2.2..
Building library for opentracing-0.2.2..

<no location info>: error: [-Wunused-packages, -Werror=unused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - semigroups-0.20 (exposed by flag -package-id
          semigroups-0.20-4d7ca4412bb6d4e28787e3e5a5adfb2334f52bd1ca711fae9ce125ecd840f480)
      - transformers-0.5.6.2 (exposed by flag -package-id transformers-0.5.6.2)

The ghc-8.6.1 build still works with those unused packages removed.

kim commented 1 year ago

Fixed in #48