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

flutter 1.9.1 (new formula) #46727

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Formula/flutter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class Flutter < Formula
desc "Google’s UI toolkit for mobile, web, and desktop from a single codebase"
homepage "https://flutter.dev"
url "https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.9.1+hotfix.6-stable.zip"
Copy link
Member

Choose a reason for hiding this comment

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

Homebrew core builds from source, or installs cross-platform binaries. See https://docs.brew.sh/Acceptable-Formulae

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the code review
Corrected as pointed out, the proper way is to change the PR to homebrew cask, but I have found similar PR in the past.
And it has come to the point of sending PR to the homebrew formulae.
Please tell me which is the best method.
Homebrew/homebrew-cask#63170

Copy link
Member

Choose a reason for hiding this comment

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

If it doesn't build from source it can't be a formula in homebrew-core. If you want to submit it as a cask or make a formula in a private tap is up to you.

Copy link
Member

@vitorgalvao vitorgalvao Nov 15, 2019

Choose a reason for hiding this comment

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

While this submission doesn’t build from source, I see no indication it can’t be done.

Copy link
Author

@mofneko mofneko Nov 17, 2019

Choose a reason for hiding this comment

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

@fxcoudert and @SMillerDev
What is your opinion on HomeBrew's permanent solution to pr for packages that don't have a GUI and are not built from source, like this one?

Copy link
Author

Choose a reason for hiding this comment

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

@fxcoudert and @SMillerDev and @vitorgalvao

I want to hear the final opinion of the homebrew team.
Does it mean that HomeBrew, even if it comes with pre-built binaries, must be rebuilt to be included in the package? Also, if I modify it as a formulae to build the flutter engine, will it be merged?

Copy link
Member

Choose a reason for hiding this comment

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

If something can't build from source it could be a cask. If it can it can be a formula in homebrew-core. For that to happen, the rules that were linked twice already must be followed, including but not limited to building the software from source. As for it getting merged, that depends on if you write a formula of sufficient quality to include it in homebrew-core. I can't give any guarantee on merging it before you start.

Copy link
Author

@mofneko mofneko Nov 18, 2019

Choose a reason for hiding this comment

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

"If something can't build from source it could be a cask."
This doesn't seem to be the case, and this seems to be rejected for CUI-only binaries.
In other words, HomeBrew potentially has the disadvantage of being unacceptable in both the core and the cask, regardless of the popularity of the tool that sent the PR.

Regarding the creation of formulae including redundant builds, we will consider modifying this PR.

Copy link
Member

Choose a reason for hiding this comment

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

"If something can't build from source it could be a cask."
This doesn't seem to be the case

It is the case, because it isn’t true that this can’t be built from source. Or it is true, that point hasn’t been made with a justification.

HomeBrew potentially has the disadvantage of being unacceptable in both the core and the cask, regardless of the popularity of the tool that sent the PR.

Barring special situations, if a tool is popular enough and it can be built from source, it will be added to Homebrew when someone submits it. If no one does and there’s no reason not too, it wasn’t that popular to our user base.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for this bikeshedding session. None of this applies to flutter, it's well known and popular and builds from source and there has been plenty of explanation what the requirements are for the formula. If you have a pull request that builds from source we can reconsider.

sha256 "8d0b3e217e45fbde64e117c5932ec5bd18ced0e8e8fba80a0fec95e38854bb6a"

def install
cp_r ".", prefix
end

def post_install
chmod_R "u+w", prefix/"bin/cache"
mofneko marked this conversation as resolved.
Show resolved Hide resolved
end

test do
system "#{bin}/flutter", "create brew_test"
assert_predicate testpath/"brew_test/brew_test.iml", :exist?
end
end