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

Nix build in ci fails due to primitive-extras-0.10.1 build error with ghc-9.0.1 #2430

Closed
jneira opened this issue Dec 2, 2021 · 5 comments · Fixed by #2452
Closed

Nix build in ci fails due to primitive-extras-0.10.1 build error with ghc-9.0.1 #2430

jneira opened this issue Dec 2, 2021 · 5 comments · Fixed by #2452
Labels
CI Continuous integration os: nixos type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@jneira
Copy link
Member

jneira commented Dec 2, 2021

primitive-extras> Preprocessing library for primitive-extras-0.10.1..
primitive-extras> Building library for primitive-extras-0.10.1..
primitive-extras> [ 1 of 10] Compiling PrimitiveExtras.Prelude ( library/PrimitiveExtras/Prelude.hs, dist/build/PrimitiveExtras/Prelude.o, dist/build/PrimitiveExtras/Prelude.dyn_o )
primitive-extras> [ 2 of 10] Compiling PrimitiveExtras.Types ( library/PrimitiveExtras/Types.hs, dist/build/PrimitiveExtras/Types.o, dist/build/PrimitiveExtras/Types.dyn_o )
primitive-extras> [ 3 of 10] Compiling PrimitiveExtras.SmallArray ( library/PrimitiveExtras/SmallArray.hs, dist/build/PrimitiveExtras/SmallArray.o, dist/build/PrimitiveExtras/SmallArray.dyn_o )
primitive-extras> [ 4 of 10] Compiling PrimitiveExtras.Bitmap ( library/PrimitiveExtras/Bitmap.hs, dist/build/PrimitiveExtras/Bitmap.o, dist/build/PrimitiveExtras/Bitmap.dyn_o )
primitive-extras> library/PrimitiveExtras/Bitmap.hs:5:3: error:
primitive-extras>     Ambiguous occurrence ‘singleton’
primitive-extras>     It could refer to
primitive-extras>        either ‘PrimitiveExtras.Prelude.singleton’,
primitive-extras>               imported from ‘PrimitiveExtras.Prelude’ at library/PrimitiveExtras/Bitmap.hs:25:1-70
primitive-extras>               (and originally defined in ‘base-4.15.0.0:Data.OldList’)
primitive-extras>            or ‘PrimitiveExtras.Bitmap.singleton’,
primitive-extras>               defined at library/PrimitiveExtras/Bitmap.hs:53:1
primitive-extras>   |
primitive-extras> 5 |   singleton,
primitive-extras>   |   ^^^^^^^^^
primitive-extras> [ 6 of 10] Compiling PrimitiveExtras.UnliftedArray ( library/PrimitiveExtras/UnliftedArray.hs, dist/build/PrimitiveExtras/UnliftedArray.o, dist/build/PrimitiveExtras/UnliftedArray.dyn_o )

It seems we are building an older release 0.10.1 which seems to be not compatible with ghc-9.0.1
Locally cabal picks 0.10.2

Asking for help from my dear nix+hls power users
//cc @maralorn @berberman @fendor @michaelpj

@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. CI Continuous integration os: nixos labels Dec 2, 2021
@michaelpj
Copy link
Collaborator

Dumb question: how did this make it into master? do the nix jobs not block merging?

I'll try and take a look at this.

@maralorn
Copy link
Contributor

maralorn commented Dec 2, 2021

I am very confused. As far as I can tell this error didn't happen in nixpkgs master. We would never merge an update with this issue and our ci would definitely catch this.

@jneira
Copy link
Member Author

jneira commented Dec 2, 2021

Dumb question: how did this make it into master? do the nix jobs not block merging?

I'll try and take a look at this.

the build on pr only is triggered on master if the pr does not change the nix workflow config file

# Build and then push HLS binaries with developmet shell to cachix
# This job runs when
# 1. PRs are merged to master (runs on master)
# 2. Nix files are changed (runs on PR)
build:
needs: pre_job
runs-on: ${{ matrix.os }}
env:
HAS_TOKEN: ${{ secrets.HLS_CACHIX_AUTH_TOKEN != '' }}
if: (needs.pre_job.outputs.should_skip_build != 'true' && needs.pre_job.outputs.should_skip_pr != 'true') || (github.repository_owner == 'haskell' && github.ref == 'refs/heads/master')

That pr touched the cache and maybe it could cause the issue

I think we should run it for every pr

@jneira
Copy link
Member Author

jneira commented Dec 2, 2021

That pr touched the cache and maybe it could cause the issue

Rectification: the nix build dont use the cabal cache touched in the pr so i dont see how #2419 could cause the nix build fail

@michaelpj
Copy link
Collaborator

My plan is just to try bumping nixpkgs and see if that fixes it.

@Anton-Latukha Anton-Latukha linked a pull request Dec 9, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration os: nixos type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants