Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-depends quickcheck-instances breaks new obelisk project #1073

Open
o1lo01ol1o opened this issue Apr 11, 2024 · 0 comments
Open

build-depends quickcheck-instances breaks new obelisk project #1073

o1lo01ol1o opened this issue Apr 11, 2024 · 0 comments

Comments

@o1lo01ol1o
Copy link

o1lo01ol1o commented Apr 11, 2024

If quickcheck-instances is included as a dependency in common.cabal, building the ghcjs shell will complain about missing text-short:

$ nix-shell -A shells.ghcjs

Configuring quickcheck-instances-0.3.28...
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.2.1.0 supports
'ghc' version < 8.8):
/nix/store/d86qdapc72py8z00p569g09yjkmhyssg-ghcjs-8.10.7/bin/ghcjs is is based
on GHC version 8.10.7
CallStack (from HasCallStack):
  $, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1024:20 in Cabal-3.2.1.0:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:477:12 in Cabal-3.2.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:625:20 in Cabal-3.2.1.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:65:5 in Cabal-3.2.1.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:180:19 in Cabal-3.2.1.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:116:27 in Cabal-3.2.1.0:Distribution.Simple
  defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing or private dependencies:
text-short >=0.1.3 && <0.2

This is unexpected since text-short is pinned in a set of overlays in reflex-platform and querying the store says that text-short is included as an input to the derivation:

nix-store -q --tree /nix/store/4xya277dhb9xvzgydyj0bn4hxj5mq2w5-quickcheck-instances-0.3.28.drv | grep text-short
│   │   │   │   ├───/nix/store/mqzdz7kpk7y4rg7l15qcc0r2fsrbgbkj-text-short-0.1.5.drv
│   │   │   │   │   ├───/nix/store/hi7sbnq9a59b8nnhvngfrwhdc7jv53zs-text-short-0.1.5.tar.gz.drv
│   │   │   │   │   ├───/nix/store/hr4ddyh5jdb2fk0rkv5s6fwgrhg0rga7-text-short-0.1.5-r1.cabal.drv
│   │   │   ├───/nix/store/mqzdz7kpk7y4rg7l15qcc0r2fsrbgbkj-text-short-0.1.5.drv [...]
│   │       │       │   ├───/nix/store/mph9ll0rwlv17wh395rv4gx6isspznw7-text-short-0.1.5.drv
│   │       │       │   │   ├───/nix/store/hi7sbnq9a59b8nnhvngfrwhdc7jv53zs-text-short-0.1.5.tar.gz.drv [...]
│   │       │       │   │   ├───/nix/store/hr4ddyh5jdb2fk0rkv5s6fwgrhg0rga7-text-short-0.1.5-r1.cabal.drv [...]
│   │       │   ├───/nix/store/mph9ll0rwlv17wh395rv4gx6isspznw7-text-short-0.1.5.drv [...]

Attempting to pin text-short in the local default.nix does not affect the outcome (and, I am generally unable to change the version of text-short referenced in the derivation.)

repro:

name: common
version: 0.1
cabal-version: >= 1.2
build-type: Simple

library
  hs-source-dirs: src
  build-depends: base
               , obelisk-route
               , text
               , quickcheck-instances
  exposed-modules:
    Common.Api
    Common.Route
  ghc-options: -Wall -O -fno-show-valid-hole-fits
               -- unsafe code
               -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
               -- unneeded code
               -Widentities -Wredundant-constraints
  if impl(ghc >= 8.8)
    ghc-options:
               -Wmissing-deriving-strategies
{ system ? builtins.currentSystem
, obelisk ? import ./.obelisk/impl {
    inherit system;
    iosSdkVersion = "16.1";

    # You must accept the Android Software Development Kit License Agreement at
    # https://developer.android.com/studio/terms in order to build Android apps.
    # Uncomment and set this to `true` to indicate your acceptance:
    # config.android_sdk.accept_license = false;

    # In order to use Let's Encrypt for HTTPS deployments you must accept
    # their terms of service at https://letsencrypt.org/repository/.
    # Uncomment and set this to `true` to indicate your acceptance:
    # terms.security.acme.acceptTerms = false;
  }
}:
with obelisk;
project ./. ({ ... }: {
  android.applicationId = "systems.obsidian.obelisk.examples.minimal";
  android.displayName = "Obelisk Minimal Example";
  ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal";
  ios.bundleName = "Obelisk Minimal Example";
  overrides = self: super: {
    text-short = self.callHackage "text-short" "0.1.5" { };
  };
})
@o1lo01ol1o o1lo01ol1o changed the title build-depends quickcheck-instances breaks new oblisk project build-depends quickcheck-instances breaks new obelisk project Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant