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

haskell-updates: get evaluating again #79789

Merged

Conversation

cdepillabout
Copy link
Member

@cdepillabout cdepillabout commented Feb 11, 2020

Motivation for this change

cabal-plan and policeman weren't evaluating because they were using the latest version of ansi-terminal, which got bumped to a later version:

https://hydra.nixos.org/eval/1569658?name=haskell-updates#tabs-removed

This PR fixes cabal-plan and policeman so they build, and makes sure haskell-updates can be evaluated.

Also fixup prettyprinter (and dhall, which depends on prettyprinter).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Comment on lines +1257 to +1263
cabal-plan = super.cabal-plan.overrideScope (self: super: {
optparse-applicative = self.optparse-applicative_0_15_1_0;
ansi-terminal = self.ansi-terminal_0_10_3;
base-compat = self.base-compat_0_11_1;
semialign = self.semialign_1_1;
time-compat = doJailbreak super.time-compat;
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I formatted this to be on multiple lines to make it a little easier to read.

The only change I made is to change self.ansi-terminal_0_10_2 to self.ansi-terminal_0_10_3.

@@ -2498,6 +2498,7 @@ default-package-overrides:

extra-packages:
- aeson < 0.8 # newer versions don't work with GHC 7.6.x or earlier
- ansi-terminal == 0.10.3 # required by cabal-plan, and policeman in ghc-8.8.x
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this so that haskell-updates won't get into a non-evaluatable state because of cabal-plan and policeman's use of ansi-terminal.

@cdepillabout
Copy link
Member Author

@GrahamcOfBorg build haskellPackages.cabal-plan haskell.packages.ghc882.policeman haskellPackages.dhall-json_1_6_1 spago

@cdepillabout
Copy link
Member Author

This should fix the evaluation errors on the haskell-updates branch, so I am going ahead and merging in.

@cdepillabout cdepillabout merged commit 722c98d into NixOS:haskell-updates Feb 11, 2020
@cdepillabout cdepillabout deleted the fix-up-haskell-updates branch February 11, 2020 05:44
@cdepillabout
Copy link
Member Author

Looks like hydra evaluated everything successfully:

https://hydra.nixos.org/eval/1569900

@@ -2539,6 +2540,7 @@ extra-packages:
- patience ^>= 0.1 # required by chell-0.4.x
- persistent >=2.5 && <2.8 # pre-lts-11.x versions neeed by git-annex 6.20180227
- persistent-sqlite < 2.7 # pre-lts-11.x versions neeed by git-annex 6.20180227
- prettyprinter == 1.6.1 # required by ghc 8.8.x, and dhall-1.29.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that not the latest version anyway?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettyprinter-1.6.1 is the latest version on Hackage.

However, we frequently(?) get evaluation errors when we rely on packages like prettyprinter_1_6_0 existing.

Adding prettyprinter to the list of extra-packages will hopefully help to keep the haskell-updates branch from not being able to be evaluated.

The downside of this is that when prettyprinter-1.6.2 comes out, it won't be as obvious when we need to update all the packages that are currently using prettyprinter_1_6_1.


However, I think you're probably the one that fixes like 90 to 95% of these types of breakages, so I'd be happy to leave it up to you how you want to handle this in the future.

@peti
Copy link
Member

peti commented Feb 11, 2020 via email

@cdepillabout
Copy link
Member Author

I guess there is no way to say that one or the other approach is better
in every case ... both have valid pros and cons.

Okay, this sounds reasonable. I'll decide whether to add packages to extra-packages on a case-by-case basis in the future. And when I do, I'll make sure to add a good comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants