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

Use make as a build system for opam files. #845

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

jhjourdan
Copy link
Contributor

There are now two opam files:

  • unison.opam is the main opam file. It has an optional dependency to lablgtk3, so that the GUI is built only if the lablgtk3 package is installed.
  • unison-gui.opam is a pseudo-package, with both unison and lablgtk3 as dependencies. It can be used to force the GUI to be installed.

As a side effect, remove the package information from the dune-project files, to avoid redundancy.

Fixes #842, #827

@gdt
Copy link
Collaborator

gdt commented Dec 15, 2022

Thanks for submitting, I will not be able to dig into this until January sometime.

@jhjourdan
Copy link
Contributor Author

Sure. Sorry for the delay!

@jhjourdan
Copy link
Contributor Author

One potential subject of discussion is the status of unison-fsmonitor. Up to now, this executable is not installed by make install, but seems to be needed by some features of unison. So I considered that a bug of the Makefile, and decided to install it as part of the install Makefile target.

Is this the right thing to do?

@tleedjarv
Copy link
Contributor

One potential subject of discussion is the status of unison-fsmonitor. Up to now, this executable is not installed by make install, but seems to be needed by some features of unison. So I considered that a bug of the Makefile, and decided to install it as part of the install Makefile target.

Is this the right thing to do?

Yes.

The current install target needs complete revamping anyway but this is a task for some other PR.

Also note that unison-fsmonitor is not built on macOS. There is a fsmonitor.py fallback but I think many (most?) people on macOS use a third party fsmonitor implementation instead. I don't think you have to worry about this in context of this PR.

@gdt
Copy link
Collaborator

gdt commented Dec 15, 2022

unison-fsmonitor is built on some places and not others, not just !mac. Also not on netbsd.

I am not sure we want to go down this path. I do not have time to pay attention until January.

@tleedjarv
Copy link
Contributor

unison-fsmonitor is built on some places and not others, not just !mac. Also not on netbsd.

True, and then there's nothing to install. For mac there is a fallback, so there is something to install.

I am not sure we want to go down this path.

Yes, probably not in this PR.

@jhjourdan
Copy link
Contributor Author

For the record, I rebased this branch, removing my change about the installation of fsmonitor.

And then I noticed that the install target has been removed, making this change more subtle because then the opam file needs to contain the installation script.

I'm not going to continue until anyone tells he is interested.

@tleedjarv
Copy link
Contributor

The install taget is in #939. Your testing and/or review would be very helpful.

@jhjourdan
Copy link
Contributor Author

Thanks!

I rebased this PR on top of #939, and this seem to work well.

@gdt
Copy link
Collaborator

gdt commented Feb 14, 2024

Can you rebase to master? I came to this intending to read what I expected to be a small number of commits. I'm guessing a rebase is trivial and leads to that. I did kick off the workflow.

There are now two opam files:
- unison.opam is the main opam file. It has an optional dependency to
  lablgtk3, so that the GUI is built only if the lablgtk3 package is installed.
- unison-gui.opam is a pseudo-package, with both unison and lablgtk3 as
  dependencies. It can be used to force the GUI to be installed.

As a side effect, remove the package information from the dune-project files,
to avoid redundancy.
@jhjourdan
Copy link
Contributor Author

Sure, done!

@gdt
Copy link
Collaborator

gdt commented Feb 14, 2024

Thanks. Now I can be 100% sure easily this only touches opam. I have kicked off a workflow run and will hit merge if it finishes green.

@gdt gdt merged commit c87a4a8 into bcpierce00:master Feb 14, 2024
37 checks passed
@jhjourdan
Copy link
Contributor Author

Perfect, thanks!

I'll do my best to publish releases on OPAM as soon as they appear here.

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.

Change opam packaging to have separate CLI/GUI packages and maybe fsmonitor
3 participants