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

Add uses_from_macos to formulae, part 1 (a-j) #41435

Merged
merged 81 commits into from
Jun 29, 2019
Merged

Add uses_from_macos to formulae, part 1 (a-j) #41435

merged 81 commits into from
Jun 29, 2019

Conversation

jonchang
Copy link
Contributor

@jonchang jonchang commented Jun 28, 2019

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

c.f. Homebrew/brew#6150

Note that there are many instances in linuxbrew-core where uses_from_macos is (I believe) used improperly. For example, uses_from_macos "python" is incorrect because macOS does not provide a Python 3 installation. Something to think about for a follow up issue.

I'll open a pull request for part 2 once this is merged.

@jonchang jonchang self-assigned this Jun 28, 2019
@fxcoudert
Copy link
Member

  • First question:

uses_from_macos "python@2"

With macOS Catalina approaching, which contains both Python 2 and 3… what does this mean? Does it mean “uses Python 2 on all macOS versions, even when Python 3 is there?” Something else?

  • Second question: I get this is currently a no-op, but is this actually checked / enforced on macOS? Because it could lead to divergences in formulas between the macOS and Linux version.

Imagine formula X has uses_from_macos "ncurses", because it builds with macOS curses. When the next version ships, formula X requires wide-char curses, which macOS does not have. It may fail (and then we see it), or it might build in a degraded mode, without curses — and then we won't see it. And our comment that it depends on curses is not correct anymore.

@jonchang
Copy link
Contributor Author

uses_from_macos "python@2"

With macOS Catalina approaching, which contains both Python 2 and 3… what does this mean? Does it mean “uses Python 2 on all macOS versions, even when Python 3 is there?” Something else?

It means, "use system Python 2 on all versions".

Second question: I get this is currently a no-op, but is this actually checked / enforced on macOS? Because it could lead to divergences in formulas between the macOS and Linux version.

Yes, I'll write an audit to check for linkages and that sort of thing.

Imagine formula X has uses_from_macos "ncurses", because it builds with macOS curses. When the next version ships, formula X requires wide-char curses, which macOS does not have. It may fail (and then we see it), or it might build in a degraded mode, without curses — and then we won't see it. And our comment that it depends on curses is not correct anymore.

Then it should be changed to depends_on "ncurses" meaning to use brewed ncurses.

@fxcoudert
Copy link
Member

Then it should be changed to depends_on "ncurses" meaning to use brewed ncurses.

But do we have checks that say “this is not actually used anymore”? If not, these lines will bitrot.

@jonchang
Copy link
Contributor Author

jonchang commented Jun 28, 2019

Then it should be changed to depends_on "ncurses" meaning to use brewed ncurses.

But do we have checks that say “this is not actually used anymore”? If not, these lines will bitrot.

Yes, I'll write an audit to check for linkages and that sort of thing.

Degraded functionality could be tested via brew test if the formula test is written well.

@jonchang
Copy link
Contributor Author

Audit: Homebrew/brew#6265

@fxcoudert
Copy link
Member

Thanks @jonchang

@jonchang jonchang merged commit 3d1768d into Homebrew:master Jun 29, 2019
@lock lock bot added the outdated PR was locked due to age label Jan 28, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 28, 2020
@jonchang jonchang deleted the uses_from_macos branch July 29, 2020 10:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants