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

opam file: Remove wrong build tag and unnecessary dependency #820

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

kit-ty-kate
Copy link
Contributor

@kit-ty-kate kit-ty-kate commented Nov 7, 2022

  • ocamlfind is not used when using dune as far as i can see
  • the use of the {build} tag makes unison completely disjoint with the rest of the opam state (e.g. if someone updates lablgtk they expect the packages that are using it to also use the new lablgtk). Using it this way is a hack rather than a feature.

@gdt
Copy link
Collaborator

gdt commented Nov 8, 2022

I have pinged the opam $MAINTAINER via email, asking for review comments.

@gdt
Copy link
Collaborator

gdt commented Nov 8, 2022

Also I am having trouble understanding opam docs which have

build dependencies are no longer needed at run-time: they won't trigger recompilations of your package.

and this is blurring:

  1. if the dep is not installed at runtime the package will fail
  2. some sort of interpackage dependency rule that is not clearly articulated

In general, if any build tool has changed, then it is necessary to rebuild the package because the output might be different. This could happen because a bug was fixed in gmake, or bison, or really anything. Since that's always true, this wouldn't seem to be talking about this, but it also seems to be that. I do understand that this is a common pain point in packaging systems.

@kit-ty-kate
Copy link
Contributor Author

In general, if any build tool has changed, then it is necessary to rebuild the package because the output might be different. This could happen because a bug was fixed in gmake, or bison, or really anything. Since that's always true, this wouldn't seem to be talking about this, but it also seems to be that. I do understand that this is a common pain point in packaging systems.

yes precisely. {build} is more of a hack to avoid unnecessary recompilation and should be avoided except for packages whose content shouldn't matter. e.g. conf-* and well as some build tools since if the package compilation succeeded it should be safe to keep the package in the same state (cue some annoying exceptions though..)

@kit-ty-kate
Copy link
Contributor Author

If you want to read up more on the issues with the build tag there is this excellent comment from David summarizing the situation: ocaml/opam#3850 (comment)

@tleedjarv
Copy link
Contributor

May I suggest this be discussed together with (and then included in) #671.

Also of interest may be the fact that the upstream project does not publish in the opam package repository. An independent maintainer is publishing the package. Thus the opam file in the upstream repository (if the generated file is committed at all) is not the same as it is in opam package repository.

@kit-ty-kate
Copy link
Contributor Author

kit-ty-kate commented Nov 9, 2022

Also of interest may be the fact that the upstream project does not publish in the opam package repository. An independent maintainer is publishing the package. Thus the opam file in the upstream repository (if the generated file is committed at all) is not the same as it is in opam package repository.

Yes, that’s been myself (as an opam & opam-repository maintainer) for the past 4 releases. I try to use the upstream opam file whenever possible. I did simply used opam-publish (which takes the upstream opam file) all those 4 times and returned the fixes upstream (which is this here PR).

Be it in opam-repository or not, it shouldn’t matter to the discussion anyway given it would still affect users who choose to install it from here (e.g. via opam pin or opam install .)

@tleedjarv
Copy link
Contributor

Be it in opam-repository or not, it shouldn’t matter to the discussion anyway given it would still affect users who choose to install it from here (e.g. via opam pin or opam install .)

Right. The discussion should include the question of who is maintaining the opam file. Currently in the maintainer field is the person who originally created the file (I think) but is apparently no longer maintaining it.

@gdt
Copy link
Collaborator

gdt commented Nov 9, 2022

I think there are separable issues and we can make progress on them separately

This is about minor fixes to the opam file, and I at this point do not have a problem with the proposed changes. I do care about reproducible builds, even though unison isn't there, and I basically now believe that the build feature in dune is a bug. Certainly it is not documented well enough. Thus i'm ok with just removing it.

That leaves to be addressed:

  • maintainer field is incorrect (I have pinged and am waiting for response or timeout)
  • dune-project files vs opam

but it's ok to fix one thing and leave the others for another day. So I'm going to merge this.

@gdt gdt merged commit f4a8f90 into bcpierce00:master Nov 9, 2022
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.

3 participants