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] fix hercules-ci-agent (after hackage2nix update to agent 0.7.5) #105140

Merged
merged 3 commits into from Nov 27, 2020

Conversation

roberth
Copy link
Member

@roberth roberth commented Nov 27, 2020

Motivation for this change

Fix hercules-ci-agent build on nixos-unstable. (after running hackage2nix, which I'm not supposed to do here)

Broken by in #103740

This took a while to fix, because

  • cachix was broken. That's what I started on, proposing a different fix, but my effort was duplicated
  • GHC 8.10 / Cabal 3.2.0.0 combination was broken wrt cxx-sources and inline-c-cpp
  • cachix forced an update of protolude but the updates also broke my tooling, making the migration needlessly time consuming
  • the update required a new release and my release tooling also broke with the update

Please, please, please announce default GHC upgrades and allow some time for maintainers to actually fix packages before breaking master.

Some (many?) users regard nixos-unstable as a rolling release, so we should at least make some effort to allow fixes.

That said, I do immensely appreciate @peti's and other maintainers' efforts.

I just hope that with the next upgrade you could give us some time to fix things. IIRC something like that was mentioned in the live stream.
This upgrade really took the better part of a week to make work. I don't know where I'd have been if I had to do this before the Cabal 3.2.1.0 update...

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS (out of tree, cabal2nix)
    • macOS (out of tree, cabal2nix)
    • 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.

Tests did not compile.
Message:

test/Servant/SwaggerSpec.hs:44:14: error:
    • No instance for (HasSwagger
                         (Fragment Int :> Servant.Test.ComprehensiveAPI.GET))
        arising from a use of ‘toSwagger’
    • In the expression: toSwagger comprehensiveAPI
      In an equation for ‘_x’: _x = toSwagger comprehensiveAPI
      In the second argument of ‘($)’, namely
        ‘do let _x = toSwagger comprehensiveAPI
            True `shouldBe` True’
   |
44 |     let _x = toSwagger comprehensiveAPI
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^
@roberth roberth requested a review from peti November 27, 2020 12:51
@roberth roberth changed the title Hercules ci agent 0.7.5 [haskell-updates] fix hercules-ci-agent (after hackage2nix update to agent 0.7.5) Nov 27, 2020
@cdepillabout
Copy link
Member

cc @maralorn for this as well

@maralorn
Copy link
Member

Hey @roberth,

  1. thanks for the PR.

  2. thanks for your words. I am sorry for the troubles you had and appreciate the feedback.

  3. I think, at least I actually prefer when PRs run hackage2nix (optimally only commiting changes to relevant packages) so that the PR can be tested and understood. There might haven been different policies/reasons in the past (I am not sure), but I talked with @peti about this and they don‘t apply anymore, as far as I understood.

  4. I have minor nitpicking with this PR (i.e. a link to the upstream issue about the swagger tests Test suite doesn't build with servant 0.18.2 haskell-servant/servant-swagger#129 would be nice, also I don‘t think the overrides belong into the ghc-version specific file.) But to get this into the merge this evening I will merge this how it is and follow-up on the haskell-updates branches directly.

@maralorn maralorn merged this pull request into NixOS:haskell-updates Nov 27, 2020
peti pushed a commit that referenced this pull request Nov 27, 2020
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

3 participants