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

compcert: 3.7 → 3.8 #106287

Merged
merged 1 commit into from Dec 9, 2020
Merged

compcert: 3.7 → 3.8 #106287

merged 1 commit into from Dec 9, 2020

Conversation

vbgl
Copy link
Contributor

@vbgl vbgl commented Dec 7, 2020

Motivation for this change

Improvements: https://github.com/AbsInt/CompCert/releases/tag/v3.8

Keep 3.7 around for VST.

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.

sha256 = "184nfdgxrkci880lkaj5pgnify3plka7xfgqrgv16275sqppc5hc";
})
];
patches = param.patches or [];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
patches = param.patches or [];
patches = stdenv.lib.optionals param.patches;

Copy link
Member

Choose a reason for hiding this comment

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

Note that this suggestion does not correctly evaluate: stdenv.lib.optionals takes two arguments, not one, so this would actually cause an eval error. Furthermore, if we assume that was fixed, x.f or [ ] and optionals b x.f are not equivalent anyway — x.f evaluates to an error if the field f does not exist in attrset x, while x.f or y will return y in that case, and so the proposed change would still cause an eval error. So I think the original patch is just fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess that the following works: optionals (param ? patches) param.patches. But I prefer avoiding the repetition.

These operators are documented in the nix manual.

Copy link
Member

@thoughtpolice thoughtpolice left a comment

Choose a reason for hiding this comment

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

lgtm

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 106287 run on x86_64-darwin 1

1 package built:
  • compcert

@vbgl vbgl merged commit a35e7da into NixOS:master Dec 9, 2020
@vbgl vbgl deleted the compcert-3.8 branch December 9, 2020 07:28
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