Skip to content

withHoogle does not respect exactDeps for hoogle itself  #2277

@dten

Description

@dten

Describe the bug

we have a nix shell that looks very similar to the example
https://input-output-hk.github.io/haskell.nix/tutorials/development.html#how-to-get-a-development-shell

We use stackage for snapshots and currently target nightly-2024-08-08 which importantly contains a working combination of data-default and http-client-tls

https://www.stackage.org/nightly-2024-08-08/package/data-default-0.7.1.1
https://www.stackage.org/nightly-2024-08-08/package/http-client-tls-0.3.6.3

However if we enable withHoogle: true in the last few days we are unable to build this as it fails to compile with the combination of http-client-tls-0.3.6.4 and data-default-0.8.0 neither of which are in our snapshot.

It seems that cabal itself is deciding which dependency versions to use which I was expecting exactDeps to stop

Expected behavior

hoogle server should respect exactDeps or at least the snapshot

** Extra context **

This is the error you get currently when cabal picks the latest versions

trace: haskell-nix.haskellLib.cleanGit: /nix/store/c7dklpz9nx5ssy2xmvzrk23fy586hfj3-source does not seem to be a git repository,
assuming it is a clean checkout.
error: builder for '/nix/store/3cpvh9705kbb7r61cskfx6sqkb6rq4r5-http-client-tls-lib-http-client-tls-0.3.6.4.drv' failed with exit code 1;
       last 25 log lines:
       >     |
       > 192 |         settings = mkManagerSettingsContext' defaultManagerSettings (Just globalConnectionContext) def msocksHTTP msocksHTTPS
       >     |                                                                                                    ^^^
       >
       > Network/HTTP/Client/TLS.hs:208:81: error: [GHC-39999]
       >     • Could not deduce ‘Default NC.TLSSettings’
       >         arising from a use of ‘def’                                                                                                                                                         >       from the context: MonadIO m
       >         bound by the type signature for:
       >                    newTlsManagerWith :: forall (m :: * -> *).
       >                                         MonadIO m =>
       >                                         ManagerSettings -> m Manager
       >         at Network/HTTP/Client/TLS.hs:202:1-62
       >     • In the third argument of ‘mkManagerSettingsContext'’, namely
       >         ‘def’                                                                                                                                                                               >       In the expression:
       >         mkManagerSettingsContext'
       >           set (Just globalConnectionContext) def msocksHTTP msocksHTTPS
       >       In an equation for ‘settings’:
       >           settings
       >             = mkManagerSettingsContext'
       >                 set (Just globalConnectionContext) def msocksHTTP msocksHTTPS
       >     |
       > 208 |         settings = mkManagerSettingsContext' set (Just globalConnectionContext) def msocksHTTP msocksHTTPS
       >     |                                                                                 ^^^
       For full logs, run 'nix log /nix/store/3cpvh9705kbb7r61cskfx6sqkb6rq4r5-http-client-tls-lib-http-client-tls-0.3.6.4.drv'.
error: 1 dependencies of derivation '/nix/store/hs0jjj18rqk34g73d4vvh6l4877h69w7-http-conduit-lib-http-conduit-2.3.9.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qx7kcyb8mxgjkx7aw3ls2krzc84ww0xh-hoogle-lib-hoogle-5.0.18.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3fzw19s9wd4fd68b3aa8dx3j8n782vl1-hoogle-exe-hoogle-5.0.18.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l2qrihinyardws1bfsq7l4wpjdmzfhi0-hoogle-with-packages.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dsr7ij77hm6r61j07fdr4i5xayyrxckq-ghc-shell-for-packages-ghc-9.8.2-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/znl4v0r9x9553cybi6ig0f2w3a96lkas-ghc-shell-for-packages.drv' failed to build

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions