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.elpi: 1.10.2 -> 1.11.0 #87711

Merged
merged 4 commits into from Jun 4, 2020
Merged

Conversation

CohenCyril
Copy link
Contributor

@CohenCyril CohenCyril commented May 13, 2020

Motivation for this change

Update ocamlPackages.elpi version.
Does not build yet... (@vbgl @gares I do not understand why...)
cf https://gist.github.com/CohenCyril/fb450004e71c822313fb84da611b20d8#file-build_log-L63-L66

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.

@CohenCyril
Copy link
Contributor Author

@GrahamcOfBorg build ocamlPackages.elpi

@gares
Copy link
Contributor

gares commented May 13, 2020

The problem is that the version of ppxlib you use is too old, even if I don't specify any version in the opam file. I'll update the opam file upstream.

You use 0.8.x while I need >= 0.12.0

@vbgl
Copy link
Contributor

vbgl commented May 13, 2020

Then #87694 should fix this.

@CohenCyril
Copy link
Contributor Author

@gares @vbgl I rebased on #87694 for the test, and it remove one error message out of three.
cf https://gist.github.com/CohenCyril/0bf93ea4c36d0282b207cb334436251d

@CohenCyril
Copy link
Contributor Author

@GrahamcOfBorg build ocamlPackages.elpi

@CohenCyril
Copy link
Contributor Author

CohenCyril commented May 14, 2020

@vbgl commit 20b558a works for me, I had to bump up the versions of ocaml-migrate-parsetree and ppxfind, should I do it globally or via overrides? in a separate PR or in this one?

@vbgl
Copy link
Contributor

vbgl commented May 14, 2020

If the changes are independent, separate PRs I find easier to review.

Updating ppxfind might break a few things.

@vbgl
Copy link
Contributor

vbgl commented May 14, 2020

After quick testing, it seems that OMP and ppxfind should be both updated at once. Also, to avoid breaking 2⁸ packages, you may need #87824.

@gares
Copy link
Contributor

gares commented May 14, 2020

@CohenCyril , is the bump of ppxfind really needed?

@CohenCyril
Copy link
Contributor Author

@CohenCyril , is the bump of ppxfind really needed?

it was needed for OMP 1.7 but maybe not for 1.6 let me check!

@CohenCyril
Copy link
Contributor Author

@CohenCyril , is the bump of ppxfind really needed?

it was needed for OMP 1.7 but maybe not for 1.6 let me check!

nop... (https://github.com/jeremiedimino/ppxfind/releases/tag/1.4)

Copy link
Contributor

@vbgl vbgl left a comment

Choose a reason for hiding this comment

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

There is no need for the complexity of several versions of OMP and ppxfind.

@CohenCyril
Copy link
Contributor Author

There is no need for the complexity of several versions of OMP and ppxfind.

Good to know, I did not know how to check whether a change like #88087 broke stuff, so I worked-around. I will update this PR as soon as #88087 is merged. But anyway I am still waiting for coq-elpi's next release before changing this pr to "ready".

@gares
Copy link
Contributor

gares commented May 20, 2020

This is draft PR ready to be promoted to a real PR? It seems so

@Zimmi48
Copy link
Member

Zimmi48 commented May 20, 2020

@CohenCyril I recommend fetching the dune-release tarball, i.e. something like

{
  src = fetchzip {
    url = "https://github.com/LPCIC/elpi/releases/download/v${version}/elpi-v${version}.tbz";
    sha256 = "15hamy9ifr05kczadwh3yj2gmr12a9z1jwppmp5yrns0vykjbj76";
}

so that elpi -version works correctly.

It's also a bit depressing that this PR has to move away from using buildDunePackage, with all the complexity that calling mkDerivation directly entails.

@CohenCyril
Copy link
Contributor Author

CohenCyril commented May 20, 2020

@gares

This is draft PR ready to be promoted to a real PR? It seems so

Not until we release hiearchy builder (I faked the existence of 0.9.1+alpha1 here)
EDIT: And not until #88087 is merged.

@Zimmi48

@CohenCyril I recommend fetching the dune-release tarball, i.e. something like

I will try it works indeed (EDIT: I just had to fix the homepage which used to be provided by fetchFromGithub)

It's also a bit depressing that this PR has to move away from using buildDunePackage, with all the complexity that calling mkDerivation directly entails.

I agree,... @gares what difference would it make if we called dune directly rather than make?

In commit 25b66e1 I tried and I saw no problem. Would a problem occur on different uses that coq-elpi and hierarchy-builder?

@CohenCyril
Copy link
Contributor Author

@GrahamcOfBorg build ocamlPackage.elpi coqPackages_8_11.coq-elpi coqPackages_8_11.hierarchy-builder

@gares
Copy link
Contributor

gares commented May 20, 2020

I agree,... @gares what difference would it make if we called dune directly rather than make?

The only different thing is that in Makefile I hack elpi.install since it wants to install ppxfindcache_* which are internal binaries (it won't really hurt having them installed, but it sucks). I can't make them internal otherwise dune does not build them before calling the ppx rules that use these binaries. I've never figured out if it is a real bug, or if I'm doing something wrong. I may even had open a bug on dune and forgot.

How does nix compute which files are part of a package?

@CohenCyril
Copy link
Contributor Author

How does nix compute which files are part of a package?

everything that is copied to the $out directory is part of the package.

@gares
Copy link
Contributor

gares commented May 20, 2020

hum, then you can probably call dune and only keep the elpi binary (no other binary in $out/bin)

@CohenCyril
Copy link
Contributor Author

alright!

@gares
Copy link
Contributor

gares commented Jun 3, 2020

It's green

@CohenCyril
Copy link
Contributor Author

hum, then you can probably call dune and only keep the elpi binary (no other binary in $out/bin)

@gares, the contents of $out/bin is elpi, ppxfindcache_deriving_std and ppxfindcache_elpi_trace_deriving_std.
If I try to remove anything, coq-elpi does not compile anymore. Is it normal?

@gares
Copy link
Contributor

gares commented Jun 3, 2020

these binaries are not used by coq-elpi Makefile. So it is fishy. (Also, I remove them in Opam...)

@gares
Copy link
Contributor

gares commented Jun 3, 2020

You can leave them there, they won't hurt. They are just useless.

@CohenCyril CohenCyril marked this pull request as ready for review June 3, 2020 15:21
@CohenCyril
Copy link
Contributor Author

@GrahamcOfBorg build ocamlPackage.elpi coqPackages_8_11.coq-elpi coqPackages_8_11.hierarchy-builder

@CohenCyril
Copy link
Contributor Author

@vbgl all green 👍

@vbgl
Copy link
Contributor

vbgl commented Jun 4, 2020

@GrahamcOfBorg build coqPackages_8_11.hierarchy-builder

@vbgl vbgl merged commit cc1f954 into NixOS:master Jun 4, 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

4 participants