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

Haddock builds which require .chi files fail to build #2243

Open
JackKelly-Bellroy opened this issue Aug 19, 2024 · 0 comments
Open

Haddock builds which require .chi files fail to build #2243

JackKelly-Bellroy opened this issue Aug 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JackKelly-Bellroy
Copy link
Contributor

Describe the bug

Builds of ...-haddock derivations (of packages containing .chs files?) fail due to missing .chi files:

$ nix develop -L
glib-lib-glib> Running phase: unpackPhase
glib-lib-glib> unpacking source archive /nix/store/r9xxmh0lww9x72arhy00azf7alglx794-glib-0.13.11.0.tar.gz
glib-lib-glib> source root is glib-0.13.11.0
glib-lib-glib> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file glib-0.13.11.0/System/Glib/Utils.chs
glib-lib-glib> Running phase: patchPhase
glib-lib-glib> '/build/.attr-0h9ydb7s8pfhl5kfs3rmmwnmpi49yyiw7jgr5dpw9rmvv8sy0f2b' -> 'glib.cabal'
glib-lib-glib> Running phase: updateAutotoolsGnuConfigScriptsPhase
glib-lib-glib> Running phase: configurePhase
glib-lib-glib> Configure flags:
glib-lib-glib> --prefix=/nix/store/2ysrqlqinwy8xp6lqjv7pzq3r273kj2c-glib-lib-glib-0.13.11.0 lib:glib --package-db=clear --package-db=/nix/store/6bh0yjlz9zaxi5asa16vg2hy74ndwilc-glib-lib-glib-0.13.11.0-haddock-configFiles/lib/ghc-9.6.6/lib/package.conf.d --flags=closure_signals --exact-configuration --dependency=utf8-string=utf8-string-1.0.2-4EKzqy1iFzL6FQeKmc9Leh --dependency=Cabal=Cabal-3.10.3.0 --dependency=Cabal-syntax=Cabal-syntax-3.10.3.0 --dependency=array=array-0.5.6.0 --dependency=base=base-4.18.2.1 --dependency=binary=binary-0.8.9.1 --dependency=bytestring=bytestring-0.11.5.3 --dependency=containers=containers-0.6.7 --dependency=deepseq=deepseq-1.4.8.1 --dependency=directory=directory-1.3.8.5 --dependency=exceptions=exceptions-0.10.7 --dependency=filepath=filepath-1.4.300.1 --dependency=ghc-bignum=ghc-bignum-1.3 --dependency=ghc-boot-th=ghc-boot-th-9.6.6 --dependency=ghc-prim=ghc-prim-0.10.0 --dependency=mtl=mtl-2.3.1 --dependency=parsec=parsec-3.1.16.1 --dependency=pretty=pretty-1.1.3.6 --dependency=process=process-1.6.19.0 --dependency=rts=rts-1.0.2 --dependency=stm=stm-2.5.1.0 --dependency=system-cxx-std-lib=system-cxx-std-lib-1.0 --dependency=template-haskell=template-haskell-2.20.0.0 --dependency=text=text-2.0.2 --dependency=time=time-1.12.2 --dependency=transformers=transformers-0.6.1.0 --dependency=unix=unix-2.8.4.0 --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-pkg-config=pkg-config --with-gcc=cc --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-executable-dynamic --disable-coverage --enable-library-for-ghci --datadir=/share/ghc-9.6.6 --enable-split-sections --docdir=/nix/store/75igdi02b4ni7l5cl5i72yfligxzfnjj-glib-lib-glib-0.13.11.0-haddock-doc/share/doc/glib
glib-lib-glib> Configuring library for glib-0.13.11.0..
glib-lib-glib> Running phase: buildPhase
glib-lib-glib> Preprocessing library for glib-0.13.11.0..
glib-lib-glib> Setup: System/Glib/Types.chi not found in:
glib-lib-glib> /nix/store/f5n3scys9b0gib19q3wx729z4szsfigv-utf8-string-lib-utf8-string-1.0.2/lib/x86_64-linux-ghc-9.6.6/utf8-string-1.0.2-4EKzqy1iFzL6FQeKmc9Leh
glib-lib-glib> /nix/store/yplvrfymva4xxl4gajmbxr5wfwsilw9n-ghc-9.6.6/lib/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6/text-2.0.2
glib-lib-glib> /nix/store/yplvrfymva4xxl4gajmbxr5wfwsilw9n-ghc-9.6.6/lib/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6/containers-0.6.7
glib-lib-glib> /nix/store/yplvrfymva4xxl4gajmbxr5wfwsilw9n-ghc-9.6.6/lib/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6/bytestring-0.11.5.3
glib-lib-glib> /nix/store/yplvrfymva4xxl4gajmbxr5wfwsilw9n-ghc-9.6.6/lib/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6/base-4.18.2.1
glib-lib-glib> dist/build
glib-lib-glib> .
error: builder for '/nix/store/rm81w3ag91nfzan05x4b7i7ff53gmk66-glib-lib-glib-0.13.11.0-haddock.drv' failed with exit code 1

It seems like the source for a ...-haddock derivation is built by pulling a subset of the package source, and it's not bringing across everything it should — glib contains System/Glib/Types.chs (which I assume is compiled to .chi at some point).

Steps To Reproduce

The attached tarball contains a flake. Unpack it and run nix develop on x86_64-linux, and it should fail. Setting withHoogle = false; will let you to enter the development shell.

Expected behavior

Development shells with Haddock should be available for packages containing .chs files.
glib-repro.tar.gz

@JackKelly-Bellroy JackKelly-Bellroy added the bug Something isn't working label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant