chadaustin / buffer-builder

Haskell library for efficiently building up buffers
BSD 3-Clause "New" or "Revised" License
25 stars 8 forks source link

Build failure #20

Open chris-martin opened 2 months ago

chris-martin commented 2 months ago
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 >     |         ^^^^^^^^^
chadaustin commented 1 month ago

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

chris-martin commented 1 month ago

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'
chadaustin commented 1 month ago
~ $ 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.)