-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Janestreet 0.9 #25658
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
Janestreet 0.9 #25658
Conversation
@Zimmi48, thanks for your PR! By analyzing the history of the files in this pull request, we identified @aske, @vbgl and @sternenseemann to be potential reviewers. |
Thanks for I've renamed |
f1bdda6
to
e75f0dd
Compare
This package set is not yet in the main repo, it lives in PR NixOS/nixpkgs#25658.
d3461db
to
a486b0d
Compare
This package set is not yet in the main repo, it lives in PR NixOS/nixpkgs#25658.
From my point of view, this PR is mostly ready. I can use the packages defined in it for my own purpose, which was to build coq-serapi.
|
For me this PR is now ready to merge. The solutions to the two last items I was referring to in my previous comment can be found in commits 4f0d1ff and 2a0ca7a (squashed since then). Do they look like acceptable solutions? |
Once this is merged we can also package https://github.com/janestreet/patdiff; I’m in no position to review this though. @sternenseemann? |
@Profpatsch I've just added to this PR a few packages which patdiff depends on. Not |
07600b6
to
115b2b2
Compare
@Zimmi48 is it normal that some derivations still seem to have the EDIT: Nevermind, I'm not sure I did this correctly... |
@Ptival This PR does not update existing derivations, but rather introduce new ones at version 0.9 under the prefix |
6463d98
to
5c7e81a
Compare
@Profpatsch This now includes core_extended which means that you have almost all the dependencies of patdiff (to the exception of pcre which is not a Jane Street package). The problem with core_extended was that a shebang needed patching. I had no idea that even @maurer It now seems that |
The clean-up could actually go much further following what was proposed in #18819. Like making 4.04 the default and keeping just one older version and only the older packages which are needed as dependencies to some other applications. But this is not the place of this PR to do that. So IMO it is fully ready to merge as-is. |
seems sensible, but this might break things outside of nixpkgs and requires fixing in nixpkgs (which should be manageable) |
if !stdenv.lib.versionAtLeast ocaml.version "4.03" | ||
then throw "${name}-${version} is not available for OCaml ${ocaml.version}" else | ||
|
||
stdenv.mkDerivation (args // { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args // {
decreases overridability, normally one wants to do } // args
at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general yes, but janePackage
is not supposed to be a generic builder, it is fitted to a very homogeneous set of packages (and in practice it has worked well). Doing what you suggest would prevent changing the value of buildInputs
as is done currently. If in the future, we want to make some more attributes configurable it can be done by using an argument with a default value (as for version
or an if
-test where this attribute is defined).
@@ -47,8 +48,6 @@ let | |||
|
|||
atdgen = callPackage ../development/ocaml-modules/atdgen { }; | |||
|
|||
base = callPackage ../development/ocaml-modules/base { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do removed packages need a deprecation period?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit message might be misleading but these packages are not removed, the duplicated definition is removed but it will be transparent for users of these packages (since e.g. ocamlPackages.janeStreet.base
is reexported as ocamlPackages.base
).
Your fix for darwin does not change anything. The issue with About your last remark about |
Indeed, I think patdiff is only an application, not a library. Does @Profpatsch confirm? I'll move it elsewhere. What location do you suggest? @vbgl Excuse my lack of knowledge but can you explain the general issue with g++, nixpkgs and Darwin. I just had a look at the manual and it indicates that g++ is made available as part of stdenv and it makes no mention of Darwin. I'm guessing that the issue is that g++ is actually platform specific. Does nixpkgs provide clang instead on Darwin as part of stdenv? In that case, I might try to patch the software depending on the platform. Or you can do it @vbgl since you are better positioned to test the fix (write access to this branch is granted to maintainers of nixpkgs). |
@vbgl That my fix for Darwin was not working was not a mystery because I had forgotten to actually include I have now moved patdiff in |
Travis' verdict: this still fails on Darwin. The error changed though. One can see something like this:
and then pages later:
This seems to indicate that even with the gcc dependency, the backend is still clang somehow. |
Last try (patching this file to have it use |
OK here's what I get (on Travis, on Darwin):
Any idea how to fix this? Otherwise I'll just change the platform like I said earlier. |
Adding Moreover, it results in crazy linking errors in I think it’s worth telling upstream about this issue. About |
I am making re2 platform specific for now because I don't want to delay this PR forever but it would be interesting to find a better solution for this. In particular, given that nixpkgs already packages Google's re2 (the C library), could it be used instead of the C sources shipped in the OCaml package? (Although for now, it is a bit outdated compared to the version Jane Street's re2 is based upon.)
Yes, although I'd be interested to have you or another OSX person do it, since the only way I could test things was through Travis (not the most practical).
Indeed, they don't, I was just following the general model without really thinking. I've updated this. |
This contains a collection of Jane Street packages at version 0.9.0. Packages not already present in ocamlPackages are also made available without the janeStreet prefix.
@vbgl @sternenseemann Can someone merge this? Travis passed. I don't think there is any reason to delay any longer. |
Done. |
I've been working to get a project that depends on core_kernel 0.10.0, and ended up bumping many packages up to 0.10.0. Considering the sheer number of packages that need bumping moving forward, is there any consensus on how to organize the janeStreet set? Is mechanically updating all packages up to 0.10.0 viable compatibility-wise? In that case, I've already done half the job, so I believe it'll be relatively easy. |
Updating all this package set to 0.10.0 at once seems a good idea. Would you like to give it a try? |
I'll take a shot at it 😄 |
@@ -0,0 +1,28 @@ | |||
{ stdenv, fetchFromGitHub, ocaml, jbuilder, findlib }: | |||
|
|||
{ name, version ? "0.9.0", buildInputs ? [], hash, meta, ...}@args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mt-caret If you change all the package versions at once you should start by changing the default argument here.
I've managed to get ocaml-ng.ocamlPackages_4_06.janeStreet built (excluding a few exceptions), but the problem now is that ocamlPackages (OCaml 4.04) fails to build across the board. I believe bumping ocamlPackages to 4.06 is one solution, but entails much more work than anticipated and probably breaks a multitude of packages. How do you think we should proceed? |
Here's where I am right now: #35439 |
This subsumes #25534 whose approach did not scale.
This creates a new set of OCaml packages, all from Jane Street, all at the same version (0.9.0).
All the packages are declared in the same file, using a shared builder.
I welcome any kind of comments. In particular, how to call this set: is
ocamlPackages.janeStreet
fine?TODO
octavius
.core_kernel
ocamlPackages
.newBuildOcamlJane
into e.g.janePackage