ekmett / pointed

pointed and copointed data
Other
23 stars 9 forks source link

fails to compile due to "Data.Functor.Bind: Can't be safely imported!" #17

Closed hvr closed 6 years ago

hvr commented 8 years ago

I haven't investigated yet, but this is what I currently get when trying to compile pointed-5:

[1 of 2] Compiling Data.Copointed   ( src/Data/Copointed.hs, /tmp/pointed-5/dist-newstyle/build/pointed-5/build/Data/Copointed.o )

src/Data/Copointed.hs:31:1-24: error:
    Data.Functor.Bind: Can't be safely imported!
    The module itself isn't safe.
hvr commented 8 years ago

This is affecting all versions of pointed starting with version 4.2.0.1, see also http://matrix.hackage.haskell.org/package/pointed

However, something must have changed, since the build-report was all green a few weeks ago

phadej commented 8 years ago

It's broke because bifunctors-5.4 aren't inferred safe anymore:

bifunctors-5.4 isn't inferred Safe because Data.Coerce is unsafe module. As I see from http://hdiff.luite.com/cgit/bifunctors/diff?id=5.4&id2=5.3 it's very big internal rewrite for modules migrated to base. I guess they should be marked Trustworthy both in ghc and bifunctors old-src. Ping @RyanGlScott

hvr commented 8 years ago

Data.Coerce had been marked temporarily Unsafe in 7.8, see discussion in https://ghc.haskell.org/trac/ghc/ticket/8827

RyanGlScott commented 8 years ago

The proximal cause of this failure has been fixed now that bifunctors-5.4 has been made unbuildable on Hackage. Still, it's a tad annoying that a module from semigroupoids was causing the build to fail simply because of safety inference... I'm going to see if I can fix that directly in semigroupoids.

RyanGlScott commented 6 years ago

This should be fixed now.

YoEight commented 6 years ago

@RyanGlScott
Hi,

I'm still having that issue today, on GHC 7.10. My CI breaks like this:

Failed to install pointed-5
Build log ( /root/.cabal/logs/pointed-5.log ):
Configuring pointed-5...
Building pointed-5...
Preprocessing library pointed-5...
[1 of 2] Compiling Data.Copointed   ( src/Data/Copointed.hs, dist/build/Data/Copointed.o )

src/Data/Copointed.hs:31:1:
    Data.Functor.Bind: Can't be safely imported!
    The module itself isn't safe.

Thanks for your time.

RyanGlScott commented 6 years ago

Do you have a full build log available?

YoEight commented 6 years ago

@RyanGlScott

Thanks for the quick response. Here's the full log.

Config file path source is default config file.
Config file /root/.cabal/config not found.
Writing default configuration to /root/.cabal/config
Downloading the latest package list from hackage.haskell.org
Resolving dependencies...
Downloading appar-0.1.4...
Downloading auto-update-0.1.4...
Configuring auto-update-0.1.4...
Downloading base-compat-0.9.3...
Downloading base-orphans-0.6...
Configuring base-compat-0.9.3...
Configuring appar-0.1.4...
Downloading base64-bytestring-1.0.0.1...
Downloading basement-0.0.6...
Configuring base-orphans-0.6...
Configuring base64-bytestring-1.0.0.1...
Downloading byteable-0.1.1...
Downloading byteorder-1.0.4...
Configuring basement-0.0.6...
Downloading clock-0.7.2...
Configuring byteable-0.1.1...
Downloading cryptohash-md5-0.11.100.1...
Configuring byteorder-1.0.4...
Configuring clock-0.7.2...
Downloading cryptohash-sha1-0.11.100.1...
Configuring cryptohash-md5-0.11.100.1...
Downloading data-binary-ieee754-0.4.4...
Downloading data-default-class-0.1.2.0...
Configuring data-binary-ieee754-0.4.4...
Downloading dlist-0.8.0.4...
Configuring cryptohash-sha1-0.11.100.1...
Downloading dotnet-timespan-0.0.1.0...
Configuring dlist-0.8.0.4...
Configuring data-default-class-0.1.2.0...
Downloading easy-file-0.2.1...
Configuring easy-file-0.2.1...
Downloading entropy-0.3.8...
Downloading fail-4.9.0.0...
Configuring dotnet-timespan-0.0.1.0...
Configuring fail-4.9.0.0...
Downloading hourglass-0.2.10...
Configuring entropy-0.3.8...
Downloading integer-logarithms-1.0.2...
Downloading monad-loops-0.4.3...
Configuring integer-logarithms-1.0.2...
Configuring monad-loops-0.4.3...
Downloading mtl-2.2.1...
Downloading network-2.6.3.3...
Configuring mtl-2.2.1...
Downloading network-info-0.2.0.9...
Configuring network-2.6.3.3...
Downloading old-locale-1.0.0.7...
Configuring hourglass-0.2.10...
Downloading prelude-extras-0.4.0.3...
Configuring network-info-0.2.0.9...
Configuring old-locale-1.0.0.7...
Downloading primitive-0.6.2.0...
Configuring primitive-0.6.2.0...
Downloading random-1.1...
Downloading safe-0.3.16...
Configuring random-1.1...
Configuring prelude-extras-0.4.0.3...
Downloading split-0.2.3.2...
Configuring safe-0.3.16...
Downloading stm-2.4.4.1...
Configuring stm-2.4.4.1...
Downloading syb-0.7...
Downloading text-1.2.3.0...
Configuring syb-0.7...
Configuring split-0.2.3.2...
Downloading th-abstraction-0.2.6.0...
Downloading th-lift-0.7.7...
Downloading time-locale-compat-0.1.1.3...
Downloading transformers-compat-0.5.1.4...
Downloading unliftio-core-0.1.1.0...
Downloading void-0.7.2...
Downloading zlib-0.6.1.2...
Building mtl-2.2.1...
Building auto-update-0.1.4...
Building appar-0.1.4...
Building basement-0.0.6...
Building fail-4.9.0.0...
Building base64-bytestring-1.0.0.1...
Building dlist-0.8.0.4...
Building integer-logarithms-1.0.2...
Building easy-file-0.2.1...
Building byteorder-1.0.4...
Building base-compat-0.9.3...
Building monad-loops-0.4.3...
Building data-default-class-0.1.2.0...
Building byteable-0.1.1...
Building cryptohash-sha1-0.11.100.1...
Building dotnet-timespan-0.0.1.0...
Building base-orphans-0.6...
Building clock-0.7.2...
Building cryptohash-md5-0.11.100.1...
Building data-binary-ieee754-0.4.4...
Installed fail-4.9.0.0
Downloading cereal-0.5.4.0...
Configuring text-1.2.3.0...
Configuring th-abstraction-0.2.6.0...
Installed auto-update-0.1.4
Configuring th-lift-0.7.7...
Installed byteable-0.1.1
Configuring transformers-compat-0.5.1.4...
Installed data-default-class-0.1.2.0
Building text-1.2.3.0...
Building th-abstraction-0.2.6.0...
Building entropy-0.3.8...
Configuring time-locale-compat-0.1.1.3...
Installed appar-0.1.4
Building th-lift-0.7.7...
Configuring void-0.7.2...
Installed byteorder-1.0.4
Building transformers-compat-0.5.1.4...
Configuring zlib-0.6.1.2...
Installed dotnet-timespan-0.0.1.0
Building time-locale-compat-0.1.1.3...
Configuring unliftio-core-0.1.1.0...
Installed data-binary-ieee754-0.4.4
Building void-0.7.2...
Configuring cereal-0.5.4.0...
Installed dlist-0.8.0.4
Building zlib-0.6.1.2...
Installed monad-loops-0.4.3
Building unliftio-core-0.1.1.0...
Installed integer-logarithms-1.0.2
Building cereal-0.5.4.0...
Installed base64-bytestring-1.0.0.1
Installed easy-file-0.2.1
Building network-info-0.2.0.9...
Building hourglass-0.2.10...
Installed cryptohash-md5-0.11.100.1
Building old-locale-1.0.0.7...
Building syb-0.7...
Building random-1.1...
Building stm-2.4.4.1...
Building prelude-extras-0.4.0.3...
Building split-0.2.3.2...
Building primitive-0.6.2.0...
Building safe-0.3.16...
Installed cryptohash-sha1-0.11.100.1
Installed clock-0.7.2
Installed mtl-2.2.1
Downloading pem-0.2.2...
Configuring pem-0.2.2...
Installed base-compat-0.9.3
Installed time-locale-compat-0.1.1.3
Building pem-0.2.2...
Installed entropy-0.3.8
Installed void-0.7.2
Installed th-lift-0.7.7
Installed transformers-compat-0.5.1.4
Downloading mmorph-1.1.0...
Downloading tagged-0.8.5...
Configuring tagged-0.8.5...
Configuring mmorph-1.1.0...
Installed unliftio-core-0.1.1.0
Installed old-locale-1.0.0.7
Downloading old-time-1.1.0.3...
Configuring old-time-1.1.0.3...
Building tagged-0.8.5...
Building mmorph-1.1.0...
Installed split-0.2.3.2
Installed network-info-0.2.0.9
Installed safe-0.3.16
Installed th-abstraction-0.2.6.0
Installed stm-2.4.4.1
Downloading StateVar-1.1.0.4...
Downloading async-2.1.1.1...
Downloading exceptions-0.8.3...
Configuring async-2.1.1.1...
Downloading stm-chans-3.0.0.4...
Configuring StateVar-1.1.0.4...
Downloading transformers-base-0.4.4...
Configuring exceptions-0.8.3...
Configuring transformers-base-0.4.4...
Configuring stm-chans-3.0.0.4...
Installed pem-0.2.2
Installed prelude-extras-0.4.0.3
Building network-2.6.3.3...
Building async-2.1.1.1...
Building StateVar-1.1.0.4...
Building exceptions-0.8.3...
Installed syb-0.7
Downloading th-expand-syns-0.4.4.0...
Configuring th-expand-syns-0.4.4.0...
Building transformers-base-0.4.4...
Installed base-orphans-0.6
Building old-time-1.1.0.3...
Installed zlib-0.6.1.2
Building th-expand-syns-0.4.4.0...
Installed mmorph-1.1.0
Installed random-1.1
Installed tagged-0.8.5
Installed StateVar-1.1.0.4
Installed transformers-base-0.4.4
Downloading monad-control-1.0.2.2...
Configuring monad-control-1.0.2.2...
Installed primitive-0.6.2.0
Installed async-2.1.1.1
Downloading typed-process-0.2.1.0...
Configuring typed-process-0.2.1.0...
Installed exceptions-0.8.3
Downloading safe-exceptions-0.1.7.0...
Building monad-control-1.0.2.2...
Configuring safe-exceptions-0.1.7.0...
Installed th-expand-syns-0.4.4.0
Downloading th-reify-many-0.1.8...
Configuring th-reify-many-0.1.8...
Building typed-process-0.2.1.0...
Building safe-exceptions-0.1.7.0...
Building th-reify-many-0.1.8...
Building stm-chans-3.0.0.4...
Installed monad-control-1.0.2.2
Downloading lifted-base-0.2.3.11...
Configuring lifted-base-0.2.3.11...
Building lifted-base-0.2.3.11...
Installed safe-exceptions-0.1.7.0
Installed hourglass-0.2.10
Installed th-reify-many-0.1.8
Installed old-time-1.1.0.3
Downloading unix-time-0.3.7...
Configuring unix-time-0.3.7...
Installed typed-process-0.2.1.0
Installed stm-chans-3.0.0.4
Installed cereal-0.5.4.0
Installed lifted-base-0.2.3.11
Downloading resourcet-1.1.11...
Configuring resourcet-1.1.11...
Building resourcet-1.1.11...
Building unix-time-0.3.7...
Installed network-2.6.3.3
Downloading iproute-1.7.1...
Downloading socks-0.5.6...
Configuring socks-0.5.6...
Configuring iproute-1.7.1...
Installed unix-time-0.3.7
Building iproute-1.7.1...
Building socks-0.5.6...
Installed resourcet-1.1.11
Installed socks-0.5.6
Installed iproute-1.7.1
Installed basement-0.0.6
Downloading foundation-0.0.19...
Configuring foundation-0.0.19...
Building foundation-0.0.19...
Installed text-1.2.3.0
Downloading blaze-builder-0.4.0.2...
Downloading double-conversion-2.0.2.0...
Downloading fast-logger-2.4.10...
Configuring blaze-builder-0.4.0.2...
Downloading hashable-1.2.6.1...
Configuring fast-logger-2.4.10...
Downloading mime-types-0.1.0.7...
Configuring hashable-1.2.6.1...
Downloading parsec-3.1.11...
Configuring double-conversion-2.0.2.0...
Configuring parsec-3.1.11...
Downloading polyparse-1.12...
Configuring mime-types-0.1.0.7...
Configuring polyparse-1.12...
Building blaze-builder-0.4.0.2...
Building fast-logger-2.4.10...
Building hashable-1.2.6.1...
Building double-conversion-2.0.2.0...
Building parsec-3.1.11...
Building polyparse-1.12...
Building mime-types-0.1.0.7...
Installed fast-logger-2.4.10
Installed hashable-1.2.6.1
Downloading constraints-0.9.1...
Downloading psqueues-0.2.5.0...
Downloading scientific-0.3.5.2...
Configuring psqueues-0.2.5.0...
Downloading unordered-containers-0.2.8.0...
Configuring scientific-0.3.5.2...
Downloading uuid-types-1.0.3...
Configuring unordered-containers-0.2.8.0...
Installed blaze-builder-0.4.0.2
Configuring uuid-types-1.0.3...
Downloading cookie-0.4.3...
Downloading streaming-commons-0.1.18...
Configuring constraints-0.9.1...
Configuring cookie-0.4.3...
Configuring streaming-commons-0.1.18...
Building psqueues-0.2.5.0...
Building scientific-0.3.5.2...
Building unordered-containers-0.2.8.0...
Building uuid-types-1.0.3...
Building constraints-0.9.1...
Building cookie-0.4.3...
Building streaming-commons-0.1.18...
Installed double-conversion-2.0.2.0
Downloading text-format-0.3.1.1...
Configuring text-format-0.3.1.1...
Installed cookie-0.4.3
Building text-format-0.3.1.1...
Installed uuid-types-1.0.3
Downloading uuid-1.3.13...
Configuring uuid-1.3.13...
Installed mime-types-0.1.0.7
Building uuid-1.3.13...
Installed parsec-3.1.11
Downloading network-uri-2.6.1.0...
Configuring network-uri-2.6.1.0...
Installed scientific-0.3.5.2
Building network-uri-2.6.1.0...
Installed constraints-0.9.1
Downloading lifted-async-0.9.3.2...
Configuring lifted-async-0.9.3.2...
Installed uuid-1.3.13
Building lifted-async-0.9.3.2...
Installed psqueues-0.2.5.0
Installed polyparse-1.12
Downloading cpphs-1.20.8...
Configuring cpphs-1.20.8...
Installed streaming-commons-0.1.18
Building cpphs-1.20.8...
Installed lifted-async-0.9.3.2
Installed text-format-0.3.1.1
Installed foundation-0.0.19
Downloading memory-0.14.13...
Configuring memory-0.14.13...
Installed unordered-containers-0.2.8.0
Downloading ekg-core-0.1.1.3...
Downloading protobuf-0.2.1.1...
Downloading semigroups-0.18.3...
Configuring protobuf-0.2.1.1...
Installed network-uri-2.6.1.0
Configuring semigroups-0.18.3...
Configuring ekg-core-0.1.1.3...
Building memory-0.14.13...
Building protobuf-0.2.1.1...
Building semigroups-0.18.3...
Building ekg-core-0.1.1.3...
Installed ekg-core-0.1.1.3
Installed cpphs-1.20.8
Downloading haskell-src-exts-1.20.1...
Configuring haskell-src-exts-1.20.1...
Installed memory-0.14.13
Downloading asn1-types-0.3.2...
Downloading cryptonite-0.24...
Configuring cryptonite-0.24...
Configuring asn1-types-0.3.2...
Building haskell-src-exts-1.20.1...
Building cryptonite-0.24...
Building asn1-types-0.3.2...
Installed semigroups-0.18.3
Downloading attoparsec-0.13.2.2...
Downloading case-insensitive-1.2.0.10...
Downloading conduit-1.2.13...
Configuring attoparsec-0.13.2.2...
Configuring conduit-1.2.13...
Downloading contravariant-1.4.1...
Downloading distributive-0.5.3...
Configuring contravariant-1.4.1...
Downloading vector-0.12.0.1...
Configuring case-insensitive-1.2.0.10...
Configuring vector-0.12.0.1...
Installed protobuf-0.2.1.1
Configuring distributive-0.5.3...
Building attoparsec-0.13.2.2...
Installed asn1-types-0.3.2
Downloading asn1-encoding-0.9.5...
Configuring asn1-encoding-0.9.5...
Building conduit-1.2.13...
Building vector-0.12.0.1...
Building contravariant-1.4.1...
Building case-insensitive-1.2.0.10...
Building asn1-encoding-0.9.5...
Installed case-insensitive-1.2.0.10
Downloading http-types-0.11...
Configuring http-types-0.11...
Building http-types-0.11...
Building distributive-0.5.3...
Installed contravariant-1.4.1
Installed asn1-encoding-0.9.5
Downloading asn1-parse-0.9.4...
Configuring asn1-parse-0.9.4...
Building asn1-parse-0.9.4...
Installed distributive-0.5.3
Downloading comonad-5.0.2...
Configuring comonad-5.0.2...
Installed asn1-parse-0.9.4
Installed http-types-0.11
Downloading http-client-0.5.8...
Configuring http-client-0.5.8...
Installed conduit-1.2.13
Building http-client-0.5.8...
Building comonad-5.0.2...
Installed comonad-5.0.2
Downloading bifunctors-5.5...
Configuring bifunctors-5.5...
Building bifunctors-5.5...
Installed http-client-0.5.8
Installed bifunctors-5.5
Downloading profunctors-5.2.2...
Downloading semigroupoids-5.2.2...
Configuring semigroupoids-5.2.2...
Configuring profunctors-5.2.2...
Building profunctors-5.2.2...
Building semigroupoids-5.2.2...
Installed attoparsec-0.13.2.2
Downloading conduit-extra-1.2.3.2...
Configuring conduit-extra-1.2.3.2...
Building conduit-extra-1.2.3.2...
Installed profunctors-5.2.2
Installed semigroupoids-5.2.2
Downloading free-4.12.4...
Configuring free-4.12.4...
Building free-4.12.4...
Installed conduit-extra-1.2.3.2
Downloading monad-logger-0.3.28...
Configuring monad-logger-0.3.28...
Building monad-logger-0.3.28...
Installed monad-logger-0.3.28
Installed free-4.12.4
Downloading adjunctions-4.3...
Configuring adjunctions-4.3...
Building adjunctions-4.3...
Installed adjunctions-4.3
Downloading kan-extensions-5.0.2...
Configuring kan-extensions-5.0.2...
Installed cryptonite-0.24
Downloading dns-3.0.0...
Downloading x509-1.7.2...
Building kan-extensions-5.0.2...
Configuring x509-1.7.2...
Configuring dns-3.0.0...
Building x509-1.7.2...
Building dns-3.0.0...
Installed kan-extensions-5.0.2
Downloading pointed-5...
Configuring pointed-5...
Building pointed-5...
Installed vector-0.12.0.1
Downloading aeson-1.2.3.0...
Downloading th-lift-instances-0.1.11...
Configuring th-lift-instances-0.1.11...
Downloading vector-th-unbox-0.2.1.6...
Configuring vector-th-unbox-0.2.1.6...
Failed to install pointed-5
Build log ( /root/.cabal/logs/pointed-5.log ):
Configuring pointed-5...
Building pointed-5...
Preprocessing library pointed-5...
[1 of 2] Compiling Data.Copointed   ( src/Data/Copointed.hs, dist/build/Data/Copointed.o )

src/Data/Copointed.hs:31:1:
    Data.Functor.Bind: Can't be safely imported!
    The module itself isn't safe.
Configuring aeson-1.2.3.0...
Building th-lift-instances-0.1.11...
Building vector-th-unbox-0.2.1.6...
Building aeson-1.2.3.0...
Installed th-lift-instances-0.1.11
Downloading th-orphans-0.13.5...
Configuring th-orphans-0.13.5...
Installed x509-1.7.2
Downloading x509-store-1.6.5...
Configuring x509-store-1.6.5...
Installed vector-th-unbox-0.2.1.6
Downloading math-functions-0.2.1.0...
Configuring math-functions-0.2.1.0...
Building th-orphans-0.13.5...
Building x509-store-1.6.5...
Installed dns-3.0.0
Building math-functions-0.2.1.0...
Installed x509-store-1.6.5
Downloading x509-system-1.6.6...
Downloading x509-validation-1.6.9...
Configuring x509-validation-1.6.9...
Configuring x509-system-1.6.6...
Building x509-system-1.6.6...
Building x509-validation-1.6.9...
Installed th-orphans-0.13.5
Installed x509-system-1.6.6
Installed x509-validation-1.6.9
Downloading tls-1.4.0...
Configuring tls-1.4.0...
Building tls-1.4.0...
Installed math-functions-0.2.1.0
Downloading mwc-random-0.13.6.0...
Configuring mwc-random-0.13.6.0...
Building mwc-random-0.13.6.0...
Installed tls-1.4.0
Downloading connection-0.2.8...
Configuring connection-0.2.8...
Building connection-0.2.8...
Installed connection-0.2.8
Installed mwc-random-0.13.6.0
Downloading vector-algorithms-0.7.0.1...
Configuring vector-algorithms-0.7.0.1...
Building vector-algorithms-0.7.0.1...
Installed vector-algorithms-0.7.0.1
Downloading mono-traversable-1.0.8.1...
Configuring mono-traversable-1.0.8.1...
Building mono-traversable-1.0.8.1...
Installed aeson-1.2.3.0
Installed haskell-src-exts-1.20.1
Downloading haskell-src-meta-0.8.0.2...
Configuring haskell-src-meta-0.8.0.2...
Installed mono-traversable-1.0.8.1
Building haskell-src-meta-0.8.0.2...
Installed haskell-src-meta-0.8.0.2
Downloading interpolate-0.1.1...
Configuring interpolate-0.1.1...
Building interpolate-0.1.1...
Installed interpolate-0.1.1
cabal: Error: some packages failed to install:
machines-0.6.3 depends on pointed-5 which failed to install.
pointed-5 failed during the building phase. The exception was:
ExitFailure 1
Exited with code 1
YoEight commented 6 years ago

Just in case, I also post the .cabal file.

-- This file has been generated from package.yaml by hpack version 0.20.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: 2ed084679d9e098425d7db22199d6861787d320b60b2af03cda86815f0a509c2

name:           eventstore
version:        1.1.0
synopsis:       EventStore TCP Client
description:    EventStore TCP Client <https://eventstore.org>
category:       Database
homepage:       https://github.com/YoEight/eventstore#readme
bug-reports:    https://github.com/YoEight/eventstore/issues
author:         Yorick Laupa
maintainer:     yo.eight@gmail.com
copyright:      Yorick Laupa
license:        BSD3
license-file:   LICENSE
tested-with:    GHC >= 7.8.3 && < 8.4
build-type:     Simple
cabal-version:  >= 1.10

extra-source-files:
    .gitignore
    .travis.yml
    CHANGELOG.markdown
    eventstore-test-setup-osx.sh
    eventstore-test-setup.sh
    README.md

source-repository head
  type: git
  location: https://github.com/YoEight/eventstore

library
  hs-source-dirs:
      ./.
  default-extensions: NoImplicitPrelude OverloadedStrings LambdaCase RecordWildCards RankNTypes TemplateHaskell QuasiQuotes FlexibleContexts MultiParamTypeClasses TypeFamilies ConstraintKinds
  build-depends:
      aeson >=0.8 && <1.3
    , array
    , base >=4.7 && <5
    , bifunctors
    , bytestring
    , cereal >=0.4 && <0.6
    , clock
    , connection ==0.2.*
    , containers ==0.5.*
    , dns
    , dotnet-timespan
    , ekg-core
    , exceptions
    , fast-logger
    , hashable
    , http-client ==0.5.*
    , interpolate
    , lifted-async
    , lifted-base
    , machines >=0.6
    , monad-control
    , monad-logger >=0.3.20
    , mono-traversable ==1.*
    , mtl
    , protobuf >=0.2.1.1 && <0.3
    , random ==1.*
    , safe-exceptions
    , semigroups >=0.5
    , stm
    , stm-chans
    , text
    , text-format
    , time >=1.4 && <1.9
    , transformers-base
    , unordered-containers
    , uuid ==1.3.*
  exposed-modules:
      Database.EventStore
      Database.EventStore.Internal.Test
  other-modules:
      Database.EventStore.Internal.Callback
      Database.EventStore.Internal.Command
      Database.EventStore.Internal.Communication
      Database.EventStore.Internal.Connection
      Database.EventStore.Internal.ConnectionManager
      Database.EventStore.Internal.Control
      Database.EventStore.Internal.Discovery
      Database.EventStore.Internal.EndPoint
      Database.EventStore.Internal.Exec
      Database.EventStore.Internal.Logger
      Database.EventStore.Internal.Manager.Operation.Registry
      Database.EventStore.Internal.Operation
      Database.EventStore.Internal.Operation.Authenticate
      Database.EventStore.Internal.Operation.Catchup
      Database.EventStore.Internal.Operation.DeleteStream
      Database.EventStore.Internal.Operation.DeleteStream.Message
      Database.EventStore.Internal.Operation.Identify
      Database.EventStore.Internal.Operation.Persist
      Database.EventStore.Internal.Operation.PersistOperations
      Database.EventStore.Internal.Operation.Read.Common
      Database.EventStore.Internal.Operation.ReadAllEvents
      Database.EventStore.Internal.Operation.ReadAllEvents.Message
      Database.EventStore.Internal.Operation.ReadEvent
      Database.EventStore.Internal.Operation.ReadEvent.Message
      Database.EventStore.Internal.Operation.ReadStreamEvents
      Database.EventStore.Internal.Operation.ReadStreamEvents.Message
      Database.EventStore.Internal.Operation.StreamMetadata
      Database.EventStore.Internal.Operation.Transaction
      Database.EventStore.Internal.Operation.Transaction.Message
      Database.EventStore.Internal.Operation.Volatile
      Database.EventStore.Internal.Operation.Write.Common
      Database.EventStore.Internal.Operation.WriteEvents
      Database.EventStore.Internal.Operation.WriteEvents.Message
      Database.EventStore.Internal.OperationManager
      Database.EventStore.Internal.Operations
      Database.EventStore.Internal.Prelude
      Database.EventStore.Internal.Settings
      Database.EventStore.Internal.Stopwatch
      Database.EventStore.Internal.Stream
      Database.EventStore.Internal.Subscription.Api
      Database.EventStore.Internal.Subscription.Catchup
      Database.EventStore.Internal.Subscription.Command
      Database.EventStore.Internal.Subscription.Message
      Database.EventStore.Internal.Subscription.Packages
      Database.EventStore.Internal.Subscription.Persistent
      Database.EventStore.Internal.Subscription.Regular
      Database.EventStore.Internal.Subscription.Types
      Database.EventStore.Internal.TimerService
      Database.EventStore.Internal.Types
      Database.EventStore.Internal.Utils
      Paths_eventstore
  default-language: Haskell2010

test-suite eventstore-tests
  type: exitcode-stdio-1.0
  main-is: Main.hs
  hs-source-dirs:
      tests
  default-extensions: NoImplicitPrelude OverloadedStrings LambdaCase RecordWildCards RankNTypes TemplateHaskell QuasiQuotes FlexibleContexts MultiParamTypeClasses TypeFamilies ConstraintKinds
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      aeson
    , async
    , base >=4.7 && <5
    , bytestring
    , cereal
    , connection ==0.2.*
    , containers
    , dotnet-timespan
    , eventstore
    , exceptions
    , fast-logger
    , hashable
    , lifted-async
    , lifted-base
    , monad-control
    , mono-traversable ==1.*
    , protobuf
    , safe-exceptions
    , semigroups
    , stm
    , stm-chans
    , tasty
    , tasty-hspec
    , tasty-hunit
    , text
    , time >=1.4 && <1.9
    , transformers-base
    , unordered-containers
    , uuid
  other-modules:
      Test.Bogus.Connection
      Test.Bus
      Test.Common
      Test.Connection
      Test.Integration
      Test.Integration.Tests
      Test.Operation
      Paths_eventstore
default-language: Haskell2010
phadej commented 6 years ago

This is reproducible with GHC-7.4 .. GHC-8.0.2, dependency is semigropoids-5.2.2.

When compiled against semigroupoids-5.2 and semigroupods-5.2.1 everything seems to be OK.

Based on matrix three last releases are affected:https://matrix.hackage.haskell.org/package/pointed

screenshot from 2018-01-22 11-43-09

YoEight commented 6 years ago

Indeed building with semigroupoids >=5.2 && <5.2.2 fixes the build but if I keep that restraint, my library will be ruled out by stackage.

RyanGlScott commented 6 years ago

Ah, this is my fault, then. semigroupoids-5.2.2 introduced a Bind instance for Q from template-haskell, but Language.Haskell.TH wasn't a Safe import until GHC 8.2.2, which explains why this only happens on old GHCs.

I even promised to fix this at the source in https://github.com/ekmett/pointed/issues/17#issuecomment-233675992, but evidently failed to do so. Time to make up for lost time...

RyanGlScott commented 6 years ago

That being said, @ekmett has been moving away from supporting Safe Haskell for quite a while (quite understandably, given how incredibly fragile it is), as evidenced in a series of commits like this one. Unfortunately, that commit missed Data.Copointed, which explains the error. Perhaps the simplest fix is to remove the Safe pragma from Data.Copointed, cut a new release, and make a revision for affected older versions of pointed to prevent them from building with semigroupoids-5.2.2.

RyanGlScott commented 6 years ago

I've opted for the approach in https://github.com/ekmett/pointed/issues/17#issuecomment-359435048 with the release of pointed-5.0.1, which should fix this issue. I've also made revisions for the three old pointed releases to restrict their upper version bounds on semigroupoids to <5.2.2.

Please re-open if I missed something!

phadej commented 6 years ago

todo to self: check that matrix turns green for pointed and it's direct kmett's dependencies:

(will check tomorrow, when matrix is done rebuilding)


@RyanGlScott Does it make sense to remove {-# Safe #-} and {-# Trustworthy #-} from all of kmettverse packages?

RyanGlScott commented 6 years ago

To be honest, my philosophy is to leave it alone as much as possible :) There are some folks who have deliberately asked for modules to be Safe, mainly in "lower-level" packages such as profunctors. But at the same time, if Safe Haskell is the proximate cause of a build failure, my inclination would be to rip it out with extreme prejudice.

tl;dr When Safe gives you issues, remove it until someone else asks for it to be put back.

phadej commented 6 years ago

@RyanGlScott check.

YoEight commented 6 years ago

@RyanGlScott I concur your last patch has fixed everything. Thank you for your work!