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

ocamlPackages: Upgrade ocamlformat and ppxlib #109288

Closed
wants to merge 2 commits into from

Conversation

Julow
Copy link
Contributor

@Julow Julow commented Jan 13, 2021

Motivation for this change

Add the newer versions of OCamlformat. Ppxlib is a dependency.

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.

@@ -1,21 +1,30 @@
{ lib, fetchFromGitHub, buildDunePackage, ocaml
, version ? if lib.versionAtLeast ocaml.version "4.07" then "0.15.0" else "0.13.0"
, version ? if lib.versionAtLeast ocaml.version "4.07" then "0.18.0" else "0.13.0"
Copy link
Member

Choose a reason for hiding this comment

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

leave the default version at 0.15.0, >= 0.16.0 breaks a lot of packages currently.

Copy link
Member

Choose a reason for hiding this comment

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

To be precise this currently breaks:

dune-release jackline libbap patdiff python37Packages.bap python38Packages.bap python39Packages.bap satysfi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks

@@ -39,7 +41,23 @@ buildDunePackage rec {
useDune2 = true;

buildInputs =
if lib.versionAtLeast version "0.14"
if lib.versionAtLeast version "0.15.1"
Copy link
Member

Choose a reason for hiding this comment

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

Any special reason for having 0.15.0 and 0.15.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only difference between 0.15.0 and 0.15.1 is the change in dependency (ocaml-migrate-parsetree vs ppxlib) but the exact version should be specified and checked into projects that use this tool. This means that every versions of OCamlformat are required.

Copy link
Member

Choose a reason for hiding this comment

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

Alright fair, bit annoying that this means we specify a few not strictly required buildInputs for 0.15.1, but doesn't matter too much I think.

@sternenseemann
Copy link
Member

@GrahamcOfBorg build jackline dune-release libbap satysfi patdiff

@sternenseemann
Copy link
Member

Result of nixpkgs-review pr 109288 1

17 packages built:
  • acgtk
  • dune-release
  • eff
  • flow
  • framac
  • jackline
  • libbap
  • ocaml-crunch
  • ocamlformat (ocamlformat_0_16_0)
  • ocamlformat_0_15_1
  • patdiff
  • python37Packages.bap
  • python38Packages.bap
  • python39Packages.bap
  • satysfi
  • stog
  • why3

Copy link
Member

@sternenseemann sternenseemann left a comment

Choose a reason for hiding this comment

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

I think this is good, you might want to squash e2ccb362a04762c20dd1cfa181ba3441cf1e6767 and 70558af into one commit.

The default version is still 0.15.0 to avoid breaking other packages.
@Julow
Copy link
Contributor Author

Julow commented Jan 16, 2021

Just squashed.

@vbgl
Copy link
Contributor

vbgl commented Jan 22, 2021

Merged into master as bf010da.

I’ve made two changes to the first commit. I’ve first increased the min_version bound that was too optimistic. Then I’ve ensured that the versions of ppxlib that were already there were not modified by this commit (in particular, the order of the buildInputs is preserved): this trivially ensures that the thousands of packages that use ppxlib are not affected by this unrelated addition.

@vbgl vbgl closed this Jan 22, 2021
@Julow
Copy link
Contributor Author

Julow commented Jan 22, 2021

Thanks !

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