buffer-builder icon indicating copy to clipboard operation
buffer-builder copied to clipboard

Build failure

Open chris-martin opened this issue 1 year ago • 3 comments

  • ghc-9.8.2
  • base-4.19.1.0
  • buffer-builder-0.2.4.8
  • text-2.1.1
buffer-builder > /tmp/nix-shell.6TvZya/stack-cb8b4477c445eb72/buffer-builder-0.2.4.8/src/Data/BufferBuilder.hs:354:9: error: [GHC-76037]
buffer-builder >     Not in scope: data constructor ‘ByteArray’
buffer-builder >     Suggested fix:
buffer-builder >       Add ‘ByteArray’ to the import list in the import of
buffer-builder >       ‘Data.Text.Array’ (at src/Data/BufferBuilder.hs:73:1-35).
buffer-builder >     |
buffer-builder > 354 |     let ByteArray byteArray = arr
buffer-builder >     |         ^^^^^^^^^

chris-martin avatar Jul 29 '24 21:07 chris-martin

@chris-martin I updated to the latest Stack resolver and did not reproduce this. Do you have repro steps?

chadaustin avatar Aug 08 '24 18:08 chadaustin

I can reproduce with:

nix shell \
  'github:nixos/nixpkgs?rev=21cc704b5e918c5fbf4f9fff22b4ac2681706d90#haskell.compiler.ghc982' \
  'nixpkgs#cabal-install' \
  --command cabal repl --build-depends 'buffer-builder == 0.2.4.8'

chris-martin avatar Aug 09 '24 16:08 chris-martin

~ $ docker run -it nixos/nix bash
...
bash-5.2# nix shell \
  'github:nixos/nixpkgs?rev=21cc704b5e918c5fbf4f9fff22b4ac2681706d90#haskell.compiler.ghc982' \
  'nixpkgs#cabal-install' \
  --command cabal repl --build-depends 'buffer-builder == 0.2.4.8'
error: experimental Nix feature 'nix-command' is disabled; add '--extra-experimental-features nix-command' to enable it

Maybe you could create a repro outside of nix with the specific dependency version that causes this error? I am happy to fix but I don't have a ton of time to try to track this down. cabal update && cabal test and stack test both work. (Once I fixed the issue with Data.Aeson.Parser moving to a separate package.)

chadaustin avatar Aug 10 '24 19:08 chadaustin

I believe at this point all that's required to reproduce is to build with Stack LTS 23.

chris-martin avatar Jan 04 '25 01:01 chris-martin

I've uploaded https://hackage.haskell.org/package/buffer-builder-0.2.4.9

chadaustin avatar Jan 06 '25 04:01 chadaustin