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

Fix the opam-devel package + various fixes #4229

Merged
merged 4 commits into from
Jul 10, 2020

Conversation

kit-ty-kate
Copy link
Member

Following the merge of #4178, the opam-devel package now doesn't install anything anymore (see the special opam-devel.install makefile rule). 1471a27 should fix that.

Otherwise the rest is more of a collection of various fixes that can be taken independently:

  • 8d4ae0d is here because the opam-%.install rule is still used in the makefile (see the installlib-% rule for instance)
  • 5429c09 fixes an issue that happens when an external archive is not available to download and the script tries to get it from the cache but the url does not exist anymore.
  • 9f3dacf is a preventive fix in case someone changes the name of the opam binary (in the src/client/dune) it will not try to use the opam binary from the PATH (which, if it is not opam 2.1 already is going to hang up forever trying to get opam lock --help=groff
  • 866fbc7 fixes an issue in the opam file as dune is not compatible with the {build} tag anymore (see [RFC] relax parsing of dune-package files dune#2147)

@avsm avsm added this to the 2.1.0~alpha2 milestone Jun 16, 2020
Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

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

Thanks! A rebase, update changelog and it'll be perfect.

@rjbou rjbou added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Jul 7, 2020
@AltGr
Copy link
Member

AltGr commented Jul 8, 2020

Rebased

@rjbou rjbou removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Jul 8, 2020
doc/man/dune Outdated
@@ -1,7 +1,7 @@
(rule
(targets opam.1)
(deps opam-topics.inc opam-admin-topics.inc)
(action (with-stdout-to %{targets} (run %{bin:opam} --help=groff))))
(action (with-stdout-to %{targets} (run ../../src/client/opamMain.exe --help=groff))))
Copy link
Member

Choose a reason for hiding this comment

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

This change breaks the mingw builds - what's it fixing elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh.. I thought dune would have dealt with that and replaced the path

@dra27
Copy link
Member

dra27 commented Jul 8, 2020

Ah, looking at the description of the PR I see the answer to my question. doc/man/dune must use %{bin:opam} - the fix instead might be to a put a comment above public_name opam in src/client/dune noting that if it's changed that it needs to be changed elsewhere. To be honest, I'm not totally sure why we should be hardening the build system against external changes 🙂

@kit-ty-kate
Copy link
Member Author

The problem I was trying to solve arise when I was trying to remove the dummy opam.opam package/file and fix the opam-devel package without reintroducing a custom Makefile rule.
Since normal dune packages install their opam file in %{lib}%/opam-devel/opam (the same place opam is installed right now), I had to change the name of the binary. It seemed to worked locally (since I had opam 2.1 already installed) but I ran into an infinite loop when I tried to compile it in an environment that had opam 2.0.

But I agree this change was optional and since it fails with mingw I removed it from the PR

@dra27 dra27 mentioned this pull request Jul 8, 2020
@dra27
Copy link
Member

dra27 commented Jul 8, 2020

Hopefully the change in #4264 should make that error less weird if you hit it again in future, @kit-ty-kate!

@AltGr
Copy link
Member

AltGr commented Jul 8, 2020

Since normal dune packages install their opam file in %{lib}%/opam-devel/opam (the same place opam is installed right now)

😱 ah I get it now...
100% dune's fault though 😇

@rjbou rjbou self-requested a review July 9, 2020 18:23
@rjbou rjbou merged commit 35ba7ff into ocaml:master Jul 10, 2020
@rjbou
Copy link
Collaborator

rjbou commented Jul 10, 2020

Thanks!

@rjbou rjbou mentioned this pull request Nov 10, 2020
@rjbou rjbou modified the milestones: 2.1.0~alpha2, 2.0.8 Feb 10, 2021
@rjbou rjbou mentioned this pull request Mar 10, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants