-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
mas 1.4.2 #31058
mas 1.4.2 #31058
Conversation
You got a lot further than I did, heh. Current failing here:
|
Strange, I'll investigate. |
Found the issue. Using a relative path for It looks like |
If you can set |
Think I've got it now. Ended up using |
Failed on sierra
|
Did
|
Formula/mas.rb
Outdated
@@ -14,11 +14,34 @@ class Mas < Formula | |||
depends_on :xcode => ["9.0", :build] | |||
|
|||
def install | |||
xcodebuild "-project", "mas-cli.xcodeproj", | |||
# Pre-install a shallow copy of the CocoaPods master repo | |||
system "git", "clone", "--depth", "1", "https://github.com/CocoaPods/Specs.git", File.expand_path("~/.cocoapods/repos/master") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this as a resource and then stage the resource instead of using git clone
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. 💡
I think our custom tap may have been shadowing the core formula when I was testing |
Formula/mas.rb
Outdated
bash_completion.install "contrib/completion/mas-completion.bash" => "mas" | ||
end | ||
|
||
def caveats; <<~EOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not include these caveats, personally, as much as I appreciate that may be frustrating for y'all. We try to limit caveats pretty hard because, well, nobody really reads them and it doesn't help there are so many already 🙃.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, I'll 🔥 it
Yeah, |
New failure on Sierra:
|
Oh joy. Didn't realize that by upgrading to Swift 4.1 that it requires Xcode 9.3 and drops support for sierra. |
Ah, yeah, that'll do it. Apple is fairly sharp on dropping support for older Xcode versions, for better or worse. I think the discussion around |
Yep. Just working on a script to capture a snapshot of that git repo. |
In Homebrew terms you should be able to do something like: resource "cocoapods" do
url "https://github.com/CocoaPods/Specs.git",
:revision => "ce31522ca4adfa4b4bd07dfc3bc10bbd1dd495d7"
end
def install
(buildpath/".brew_home/.cocoapods/repos/master").install resource("cocoapods")
end |
Tried 3 approaches for this
Thanks for all your help @DomT4! |
I thought resources were supposed to be shallow from GitHub (and other whitelisted links) unless explicitly requested otherwise. Am I forgetting something on this @reitermarkus?
Is there a way to do this without relying on you/someone else upstream always being the one to update |
This new complexity is the result of switching to using CocoaPods to manage dependencies in mas-cli/mas#154. I'm having second thoughts because - as you mention - it's made maintaining the formula harder. Debating using Carthage instead. If it's any consolation, I view installing mas through Homebrew as our primary means of distribution. We have our own custom tap to support older macOS versions since the recent changes to use newer versions of Swift and Xcode have dropped support for building on all but the current version |
@DomT4 can we move this along? |
Lots of changes to the mas formula were necessary in order to get it to build within the Homebrew environment due to the addition of CocoaPods to manage dependencies. Part of the complexity was CocoaPods downloads a huge repo. Where it stands now is a bit of a hack to prevent that download and use a slimmed-down pod repo. I'm hoping we can move forward with this as-is and address maintenance concerns with a future update. mas-cli/mas#169 already addresses this, but I need to review it and do some testing. |
Cool. If you want any help, just let me know.
… On Sep 4, 2018, at 7:34 PM, Ben Chatelain ***@***.***> wrote:
Lots of changes to the mas formula were necessary in order to get it to build within the Homebrew environment due to the addition of CocoaPods to manage dependencies. Part of the complexity was CocoaPods downloads a huge repo. Where it stands now is a bit of a hack to prevent that download and use a slimmed-down pod repo.
I'm hoping we can move forward with this as-is and address maintenance concerns with a future update. mas-cli/mas#169 already addresses this, but I need to review it and do some testing.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
depends_on :xcode => ["9.3", :build] | ||
|
||
resource "cocoapods" do | ||
url "https://dl.bintray.com/phatblat/mas-bottles/master.tar.gz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think downloading an unversioned, non-official copy of the repo is acceptable in the Homebrew way of handling dependencies.
What are the alternatives? We have a cocoapods
formula which we could depend on, couldn't we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a
cocoapods
formula which we could depend on, couldn't we?
The cocoapods
formula installs the command, not the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. I think the only option is thus to wait for mas-cli/mas#169 to be merged, which moves away from cocoapods and will allow a build compatible with Homebrew's rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't this suggestion #31058 (comment) using the official repo ?
depends_on :xcode => ["9.3", :build] | ||
|
||
resource "cocoapods" do | ||
url "https://dl.bintray.com/phatblat/mas-bottles/master.tar.gz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shallow clone approach seems like the only one workable.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Closing. Will redo formula for mas 1.4.3 after mas-cli/mas#169 |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?