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

Detect available packages from homebrew #4548

Closed
wants to merge 1 commit into from

Conversation

kit-ty-kate
Copy link
Member

Even if it makes less sense than on Debian or other distributions, having opam detect which packages are available in homebrew might be still useful:

  • users might have local brew remotes
  • this helps the solver decide to avoid certain packages (e.g. camlp4 which isn't available in homebrew anymore)
  • this leaves the door open to easily tell opam that some packages have been installed manually (using opam option depext-bypass / --assume-depexts / --no-depexts)

cc @patricoferris who got the issue with camlp4 on the upcoming macOS CI

@kit-ty-kate kit-ty-kate added this to the 2.1.1 milestone Feb 12, 2021
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!

@patricoferris
Copy link

Thanks @kit-ty-kate! Unfortunately it seems that the command brew formulae doesn't also list the set of aliases (or there's no way to make it include those). It uses this items script with these parameters. This is unfortunate because some alias names are used in opam files for example:

I was testing this in macOS CI and came across it whilst installing current_ocluster:

[ERROR] Package conflict!
  * Missing dependency:
    - current_ocluster → current >= 0.3 → sqlite3 → conf-sqlite3

But a brew search reveals:

$ brew search sqlite3
==> Formulae
sqlite3 ✔

The problem with brew search is that it takes quite a while (I think it hits the Homebrew API for searching). The maintainers of Homebrew discussed aliases a long time ago. I can't seem to find any PRs that added any kind of support for this.

@kit-ty-kate
Copy link
Member Author

#4801 also shows us that this PR in its current state does not handle casks

@dra27 dra27 modified the milestones: 2.1.1, 2.1.2 Sep 17, 2021
@dra27 dra27 modified the milestones: 2.1.2, 2.1.3 Nov 19, 2021
@rjbou rjbou modified the milestones: 2.1.3, 2.1.4 Aug 12, 2022
@rjbou rjbou modified the milestones: 2.1.4, 2.1.5 Jan 6, 2023
@rjbou rjbou force-pushed the depexts-available-brew branch from b69d63c to 45a614e Compare June 15, 2023 15:16
@rjbou rjbou removed this from the 2.1.5 milestone Jul 4, 2023
@kit-ty-kate kit-ty-kate marked this pull request as draft July 10, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: WIP Not for merge at this stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants