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

haskellPackages.servant-client-core: apply patch only to 0.15 #64343

Merged
merged 1 commit into from Jul 6, 2019

Conversation

mkaito
Copy link
Contributor

@mkaito mkaito commented Jul 5, 2019

Motivation for this change

A patch was added unconditionally that only applies to 0.15, breaking
builds of 0.14.

Things done

Apply patch only if version is 0.15.*

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.

@mkaito mkaito requested a review from basvandijk as a code owner July 5, 2019 12:45
@mkaito
Copy link
Contributor Author

mkaito commented Jul 5, 2019

cc @domenkozar as patch author

inherit (pkgs.lib) getVersion versionOlder versionAtLeast;
scc = super.servant-client-core;
v = getVersion scc;
in if versionOlder v "0.16" && versionAtLeast v "0.15" then
Copy link
Member

Choose a reason for hiding this comment

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

Bug was fixed in 0.16, so it should only be applied to 0.15

Copy link
Contributor Author

@mkaito mkaito Jul 5, 2019

Choose a reason for hiding this comment

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

Isn't that exactly what this does? 0.15 => v > 0.16. So basically ~> 0.15.

EDIT: There are no servant releases 0.15 => v > 0.16 other than 0.15. I'm simplifying the patch, give me a minute.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I assumed versionOlder is not inclusive and you'd then rather write `servant-client-core.version == "0.15"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, but it was also unnecessarily complex, given that there were never any patch releases for 0.15. I just didn't bother to check. I've simplified the check significantly with that in mind.

A patch was added unconditionally that only applies to 0.15, breaking
builds of 0.14.

Apply patch only if version is 0.15
@mkaito mkaito force-pushed the mkaito/haskell-fix-servant-014 branch from 52ffb41 to d7ee2e2 Compare July 5, 2019 13:31
@domenkozar domenkozar merged commit da20f61 into NixOS:master Jul 6, 2019
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