haskell-infra / hackage-trustees

Issue tracker for Hackage maintainance and trustee operations
https://hackage.haskell.org/packages/trustees/
42 stars 7 forks source link

double-conversion-2.0.4.1 doesn't work work with base-4.17 (GHC 9.4) #349

Closed ysangkok closed 1 year ago

ysangkok commented 1 year ago

Since Haskell-mouse hasn't responded here, I now request that the trustees adjust the bounds of double-conversion-2.0.4.1 with a revision.

% cabal repl -b double-conversion
Resolving dependencies...
Build profile: -w ghc-9.4.3 -O1
In order, the following will be built (use -v for more details):
 - double-conversion-2.0.4.1 (lib) (requires download & build)
 - fake-package-0 (lib) (first run)
Downloading  double-conversion-2.0.4.1
Downloaded   double-conversion-2.0.4.1
Starting     double-conversion-2.0.4.1 (lib)
Building     double-conversion-2.0.4.1 (lib)

Failed to build double-conversion-2.0.4.1.
Build log (
/home/janus/.cabal/logs/ghc-9.4.3/double-conversion-2.0.4.1-573d745703867ed63e8c5f9c4f6177f67e48e8974d360c11349254618c6b29be.log
):
Configuring library for double-conversion-2.0.4.1..
Preprocessing library for double-conversion-2.0.4.1..
Building library for double-conversion-2.0.4.1..
[1 of 8] Compiling Data.Double.Conversion.Internal.FFI ( Data/Double/Conversion/Internal/FFI.hs, dist/build/Data/Double/Conversion/Internal/FFI.o, dist/build/Data/Double/Conversion/Internal/FFI.dyn_o )

Data/Double/Conversion/Internal/FFI.hs:50:34: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: Use ‘Type’ from ‘Data.Kind’ instead.
   |
50 | type family ForeignFloating h :: *
   |                                  ^
[2 of 8] Compiling Data.Double.Conversion.Internal.ByteStringBuilder ( Data/Double/Conversion/Internal/ByteStringBuilder.hs, dist/build/Data/Double/Conversion/Internal/ByteStringBuilder.o, dist/build/Data/Double/Conversion/Internal/ByteStringBuilder.dyn_o )

Data/Double/Conversion/Internal/ByteStringBuilder.hs:31:42: warning: [-Wtype-equality-requires-operators]
    The use of ‘~’ without TypeOperators
    will become an error in a future GHC release.
    Suggested fix: Perhaps you intended to use TypeOperators
   |
31 | convert :: (RealFloat a, RealFloat b , b ~ ForeignFloating a) => String -> CInt -> (b -> Ptr Word8 -> IO CInt) -> BoundedPrim a
   |                                          ^

Data/Double/Conversion/Internal/ByteStringBuilder.hs:35:24: warning: [-Wdeprecations]
    In the use of ‘boudedPrim’
    (imported from Data.ByteString.Builder.Prim.Internal):
    Deprecated: "Use 'boundedPrim' instead"
   |
35 | convert func len act = boudedPrim (fromIntegral len) $ \val ptr -> do
   |                        ^^^^^^^^^^
[3 of 8] Compiling Data.Double.Conversion.Internal.ByteString ( Data/Double/Conversion/Internal/ByteString.hs, dist/build/Data/Double/Conversion/Internal/ByteString.o, dist/build/Data/Double/Conversion/Internal/ByteString.dyn_o )

Data/Double/Conversion/Internal/ByteString.hs:33:42: warning: [-Wtype-equality-requires-operators]
    The use of ‘~’ without TypeOperators
    will become an error in a future GHC release.
    Suggested fix: Perhaps you intended to use TypeOperators
   |
33 | convert :: (RealFloat a, RealFloat b , b ~ ForeignFloating a) => String -> CInt -> (b -> Ptr Word8 -> IO CInt)
   |                                          ^
[4 of 8] Compiling Data.Double.Conversion.Internal.Text ( Data/Double/Conversion/Internal/Text.hs, dist/build/Data/Double/Conversion/Internal/Text.o, dist/build/Data/Double/Conversion/Internal/Text.dyn_o )

Data/Double/Conversion/Internal/Text.hs:55:9: error:
    • Could not deduce (MonadFail (ST s)) arising from a use of ‘fail’
      from the context: (RealFloat a, RealFloat b, b ~ ForeignFloating a)
        bound by the type signature for:
                   convert :: forall a b.
                              (RealFloat a, RealFloat b, b ~ ForeignFloating a) =>
                              String
                              -> CInt
                              -> (forall s. b -> MutableByteArray# s -> IO CInt)
                              -> a
                              -> Text
        at Data/Double/Conversion/Internal/Text.hs:(37,1)-(39,20)
    • In the second argument of ‘(.)’, namely ‘fail’
      In the first argument of ‘($)’, namely ‘when (size == - 1) . fail’
      In a stmt of a 'do' block:
        when (size == - 1) . fail
          $ "Data.Double.Conversion.Text."
              ++ func ++ ": conversion failed (invalid precision requested)"
   |
55 |         fail $ "Data.Double.Conversion.Text." ++ func ++
   |         ^^^^
[5 of 8] Compiling Data.Double.Conversion.Internal.TextBuilder ( Data/Double/Conversion/Internal/TextBuilder.hs, dist/build/Data/Double/Conversion/Internal/TextBuilder.o, dist/build/Data/Double/Conversion/Internal/TextBuilder.dyn_o )

Data/Double/Conversion/Internal/TextBuilder.hs:46:9: error:
    • Could not deduce (MonadFail (GHC.ST.ST s))
        arising from a use of ‘fail’
      from the context: (RealFloat a, RealFloat b, b ~ ForeignFloating a)
        bound by the type signature for:
                   convert :: forall a b.
                              (RealFloat a, RealFloat b, b ~ ForeignFloating a) =>
                              String
                              -> CInt
                              -> (forall s. b -> MutableByteArray# s -> IO CInt)
                              -> a
                              -> Builder
        at Data/Double/Conversion/Internal/TextBuilder.hs:(33,1)-(35,23)
    • In the second argument of ‘(.)’, namely ‘fail’
      In the first argument of ‘($)’, namely ‘when (size == - 1) . fail’
      In a stmt of a 'do' block:
        when (size == - 1) . fail
          $ "Data.Double.Conversion.Text."
              ++ func ++ ": conversion failed (invalid precision requested)"
   |
46 |         fail $ "Data.Double.Conversion.Text." ++ func ++
   |         ^^^^
Error: cabal: Failed to build double-conversion-2.0.4.1 (which is required by
fake-package-0). See the build log above for details.

Versions 2.0.2.0 and 2.0.4.0 are already excluded by other bounds, so they don't need to get revised.

andreasabel commented 1 year ago

Done:

andreasabel commented 1 year ago

2.0.3.0 also has build failures with e.g. GHC 9.4:

Data/Double/Conversion/TextBuilder.hs:39:58: error:
    Not in scope: data constructor ‘A.MArray’
    NB: the module ‘Data.Text.Array’ does not export ‘MArray’.

Seems like a text < 2 bound is missing for this version.

Fixed in: https://hackage.haskell.org/package/double-conversion-2.0.3.0/revisions/

Now cabal install double-conversion has no build plan candidate left for GHC 9.4. Good!