Skip to content

Conversation

@carlocab
Copy link
Member

@carlocab carlocab commented Oct 1, 2021

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • 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 --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

See discussion at #86250.

@carlocab carlocab added do not merge CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. CI-skip-dependents Pass --skip-dependents to brew test-bot. CI-no-bottles Merge without publishing bottles labels Oct 1, 2021
@carlocab carlocab changed the title ninja: make python a build-dependency ninja: make python a build-only dependency Oct 1, 2021
@carlocab
Copy link
Member Author

carlocab commented Oct 1, 2021

Tested locally by building c-ares with ninja after uninstalling python@3.9.

@carlocab
Copy link
Member Author

carlocab commented Oct 1, 2021

This is weird:

==> Running Formulae#formula!(c-ares)
==> Determining dependencies...
==> brew fetch --retry cmake gdbm mpdecimal openssl@1.1 pkg-config python@3.9 readline sphinx-doc sqlite xz

I think this is related to the Slack discussion about build dependencies of build dependencies being installed unnecessarily. CC @Bo98

@Bo98
Copy link
Member

Bo98 commented Oct 1, 2021

Looks like a regression in brew. I'll have a look.

@Bo98
Copy link
Member

Bo98 commented Oct 1, 2021

Ah wait I think that's intentional behaviour. I'll look into tweaking it however.

@Bo98
Copy link
Member

Bo98 commented Oct 1, 2021

Basically brew deps --include-build is recursive while --include-test is not. This only affects the fetch stage - it shouldn't be actually installed.

Ninja doesn't actually need Python to build anything. It uses Python
only for generating graphs, so there's no point requiring everyone to
install Python as well.

This is useful for users with non-default prefixes, since this is
relocatable but Python is not. It's also useful for CI, because formulae
that use Ninja to build will no longer need to install Python as well
unless they depend on Python in some other way.

Also, remove the Curl dependency, as the test probably still works with
system Curl.

While we're here, let's install some more useful files from the tarball.
@carlocab carlocab removed the CI-no-bottles Merge without publishing bottles label Oct 1, 2021
Comment on lines +33 to +35
doc.install "doc/manual.asciidoc"
elisp.install "misc/ninja-mode.el"
(share/"vim/vimfiles/syntax").install "misc/ninja.vim"
Copy link
Member Author

Choose a reason for hiding this comment

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

These things seemed useful to install, but probably not worth a revision bump.


depends_on "python@3.9"

uses_from_macos "curl" => :test
Copy link
Member Author

Choose a reason for hiding this comment

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

@iMichka where did you see the error that made you add this again? The test seems to pass on Linux even without this now.

Copy link
Member

Choose a reason for hiding this comment

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

See #84724

Copy link
Member Author

@carlocab carlocab Oct 2, 2021

Choose a reason for hiding this comment

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

I did see #84724, which is why I tagged you here -- that doesn't quite answer my question. That PR answers what the error was, but it doesn't say anything about where that error came from.

Copy link
Member

Choose a reason for hiding this comment

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

I don’t know. I saw an error, I fixed it. I thought it was the right thing to do. I did not investigate the root cause. It just looked like a dependency was missing, so I added it, and the error was gone. Maybe the fix was the wrong one, and if we have a better solution, please go ahead 😉

Copy link
Member

@Bo98 Bo98 Oct 3, 2021

Choose a reason for hiding this comment

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

I imagine the issue might happen if curl is installed in the CI but a dependency of curl is uninstalled (homebrew-test-bot is not designed really to rely on formulae like that - hence our issues with using HOMEBREW_FORCE_BREWED_CURL).

A fixed /usr/bin/curl reference might work.

@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@carlocab carlocab deleted the ninja-build branch October 3, 2021 23:08
@github-actions github-actions bot added the outdated PR was locked due to age label Nov 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CI-skip-dependents Pass --skip-dependents to brew test-bot. CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants