Skip to content

update ghc-api-compat in flake.nix #2180

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

Closed
wants to merge 1 commit into from
Closed

Conversation

jneira
Copy link
Member

@jneira jneira commented Sep 10, 2021

No description provided.

@jneira jneira requested a review from berberman September 10, 2021 07:28
@jneira jneira mentioned this pull request Sep 10, 2021
@jneira jneira added the merge me Label to trigger pull request merge label Sep 10, 2021
@jneira
Copy link
Member Author

jneira commented Sep 10, 2021

I am afraid that it has to use ghc-api-compat-9.0.1 instead 8.10.7 cause the build is using ghc 9:

ghc-api-compat> Configuring ghc-api-compat-8.10.7...
ghc-api-compat> Dependency base: using base-4.15.0.0
ghc-api-compat> Dependency ghc: using ghc-9.0.1
ghc-api-compat> Source component graph: component lib
ghc-api-compat> Configured component graph:
ghc-api-compat>     component ghc-api-compat-8.10.7-kJp1EBHyNG9fnpmeFy0Wa
ghc-api-compat>         include base-4.15.0.0
ghc-api-compat>         include ghc-9.0.1
ghc-api-compat> Error:
ghc-api-compat>     Problem with module re-exports:
ghc-api-compat>       - The module 'GHC.Hs.Types'
ghc-api-compat>         is not exported by any suitable package.
ghc-api-compat>         It occurs in neither the 'exposed-modules' of this package,
ghc-api-compat>         nor any of its 'build-depends' dependencies.
ghc-api-compat>       - The module 'GHC.Hs.PlaceHolder'
ghc-api-compat>         is not exported by any suitable package.
ghc-api-compat>         It occurs in neither the 'exposed-modules' of this package,
ghc-api-compat>         nor any of its 'build-depends' dependencies.
ghc-api-compat>     In the stanza library
error: builder for '/nix/store/xbmkvdf2khd1qf7knpk780wh5r1x3sdr-ghc-api-compat-8.10.7.drv' failed with exit code 1;
       last 10 log lines:
       >       - The module 'GHC.Hs.Types'
       >         is not exported by any suitable package.
       >         It occurs in neither the 'exposed-modules' of this package,
       >         nor any of its 'build-depends' dependencies.
       >       - The module 'GHC.Hs.PlaceHolder'
       >         is not exported by any suitable package.
       >         It occurs in neither the 'exposed-modules' of this package,
       >         nor any of its 'build-depends' dependencies.
       >     In the stanza library
       >
       For full logs, run 'nix log /nix/store/xbmkvdf2khd1qf7knpk780wh5r1x3sdr-ghc-api-compat-8.10.7.drv'.

@lf-
Copy link
Contributor

lf- commented Sep 10, 2021

I bet you just have to copy paste the ghc-api-compat override into the ghc9 .nix file, set the version to 9.0.1, replace some characters in the hash with 0 so it will refetch, rebuild, fix the hash, then it might work then?

@lf-
Copy link
Contributor

lf- commented Sep 10, 2021

It seems that the way that the ghc-api-compat thing works is that it needs to be built on a matching ghc version to its own version, but presumably it offers stable APIs such that a project could conceivably build with multiple versions of ghc-api-compat.

@jneira
Copy link
Member Author

jneira commented Sep 11, 2021

presumably it offers stable APIs such that a project could conceivably build with multiple versions of ghc-api-compat.

i am afraid that does not exist, could the nix script choose the right ghc-api-compat from the actual ghc, as the versions match exactly?

anyway i would no spend much time on this, ghc-api-compat will be removed with #2128

@jneira
Copy link
Member Author

jneira commented Sep 12, 2021

i am not able to make nix compute the hash auto cause i am on windows and cabal2nix is not helping me either so would be great if someone could give me the hash or complete the pr

@jneira
Copy link
Member Author

jneira commented Sep 12, 2021

and i cant push to @lf- branch

@peterbecich
Copy link
Member

Update of the sha256: https://github.com/lf-/haskell-language-server/pull/1

@peterbecich
Copy link
Member

Update of the sha256: jneira#30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants