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

WIP: Bump resolver used in release.hs #5552

Closed
wants to merge 16 commits into from
Closed

Conversation

snoyberg
Copy link
Contributor

Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

@snoyberg snoyberg requested a review from borsboom May 28, 2021 16:26
@borsboom
Copy link
Contributor

I think the integration tests might be failing due to using an LTS that requires a different GHC version than is already available. Probably best to bump the integration tests to also use a consistent LTS.

One of these days I might just drop the release.hs script entirely and replace it with a simple shell script, since CI is now handling all the builds and there's no longer the need for so much complexity. Probably not worth doing unless significant changes would be needed though.

@snoyberg
Copy link
Contributor Author

One of these days I might just drop the release.hs script entirely and replace it with a simple shell script,

+1 from me on that happening ultimately, but agreed, no rush

@snoyberg snoyberg changed the title Bump resolver used in release.hs WIP: Bump resolver used in release.hs May 31, 2021
@snoyberg
Copy link
Contributor Author

I'm in particular unable to fix up the Nix problems here. If someone else is interested in taking a crack at that, I'd really appreciate it.

snoyberg added a commit that referenced this pull request May 31, 2021
This also updates release.hs to use a more recent resolver, since
otherwise we'll have trouble on ARM64 with conflicting LLVM
installations. Unlike #5552, I took the simple workaround here of
installing GHC 8.6.5 in addition to the more recent GHC needed by
release.hs.
@qrilka
Copy link
Contributor

qrilka commented May 31, 2021

@snoyberg I've tried it out locally but couldn't reproduce, the error

error: attribute 'ghc8104' missing, at (string):1:43
5259
(use '--show-trace' to show detailed location information)

means that there is no ghc8.10.4 in nixpkgs but it seems to be present in the latest <nixpkgs> that I just pulled - https://github.com/NixOS/nixpkgs/blob/84aa23742f6c72501f9cc209f29c438766f5352d/pkgs/top-level/haskell-packages.nix#L68

@snoyberg
Copy link
Contributor Author

I discovered the line in question here:

nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs

We locked it down previously to make the test suite reproducible. But I have no idea what we should bump it to instead.

@qrilka
Copy link
Contributor

qrilka commented May 31, 2021

Oh, I completely forgot that it was pinned, sorry, will take a look

snoyberg added a commit that referenced this pull request May 31, 2021
This also updates release.hs to use a more recent resolver, since
otherwise we'll have trouble on ARM64 with conflicting LLVM
installations. Unlike #5552, I took the simple workaround here of
installing GHC 8.6.5 in addition to the more recent GHC needed by
release.hs.
@snoyberg
Copy link
Contributor Author

FYI, I'm already including a workaround in this PR:

95d214c

It's not as good, since it still requires two GHCs to be installed, but it does work around using the older GHC for release.hs itself.

@qrilka
Copy link
Contributor

qrilka commented May 31, 2021

@snoyberg it looks like we can't use the last stable version 20.09 as there's no 8.10.4 there:

$ NIX_PATH='nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz'  nix-instantiate --eval -E 'builtins.attrNames((import <nixpkgs> {}).haskell.compiler)'
unpacking 'https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz'...
[ "ghc8101" "ghc8102" "ghc822Binary" "ghc865" "ghc865Binary" "ghc882" "ghc883" "ghc884" "ghcHEAD" "ghcjs" "ghcjs86" "integer-simple" "native-bignum" ]

but 21.05 is almost released so I guess this should be good enough as an option

$ NIX_PATH='nixpkgs=https://github.com/NixOS/nixpkgs/archive/release-21.05.tar.gz'  nix-instantiate --eval -E 'builtins.attrNames((import <nixpkgs> {}).haskell.compiler)'
unpacking 'https://github.com/NixOS/nixpkgs/archive/release-21.05.tar.gz'...
[ "ghc8102Binary" "ghc8102BinaryMinimal" "ghc8104" "ghc865Binary" "ghc884" "ghc901" "ghcHEAD" "integer-simple" "native-bignum" ]

but there's no channel for it yet so some other way of pinning is needed

@qrilka
Copy link
Contributor

qrilka commented May 31, 2021

@snoyberg I guess using env vars in that test could be even more explicit and we'll have the same config both in CI and locally and it looks like NIX_PATH is the way to go:

NIX_PATH='nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz' stack exec -- nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
"20.09pre-git"

With the URL to set in the test https://github.com/NixOS/nixpkgs/archive/release-21.05.tar.gz

@mpilgrem
Copy link
Member

Rather late in the day, I realised that this pull request was seeking to do part of what I am trying to do in pull request #5697 (move stack to lts-19.7/GHC 9.0.2) - but this request is for lts-8.10.4/lts-17.10. My GHC 9.0.2 pull request passes the unit tests, and the integration tests on Windows, but I am stuck with [1] the integration tests running on macos-latest (my current task) and [2] the integration tests that need 'alpine' or 'docker' (see #5736 (comment)). I have not worked out how I can test CI in my fork, so I am trying to fix the CI in my pull request.

@mpilgrem
Copy link
Member

I am going to close this pull request, as I think it has been overtaken by either #5697 (which was trying to move Stack to the current LTS, being GHC 9.0.2) or, more likely, #5763 (which is trying to move Stack to GHC 9.2.3 - the subject of the current nightly resolver).

@mpilgrem mpilgrem closed this Jul 25, 2022
@mpilgrem mpilgrem deleted the bump-release-resolver branch September 5, 2022 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants