-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
formula: add :swift
dependency
#7788
Conversation
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.
Good idea! Like where this is going so far.
@xcode_requirement.satisfied? | ||
end | ||
|
||
def xcode_required_version |
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.
Might be nice to keep this in Library/Homebrew/os/mac/xcode.rb
so it's updated when that is.
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.
Actually I put it there initially. I moved it out because this goes opposite direction which would make it only reverse lookup there but if you are ok with that I'll put it back 🤷
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 think it's fine for the lookup to be the same way around as here but it's more likely to get bumped there, I think.
attr_reader :version | ||
|
||
def initialize(tags = []) | ||
@version = tags.shift if tags.first.to_s.match?(/(\d\.)+\d/) |
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.
Should this use the formula on Linux? Does it work there?
The only doubt I have that it's easy to confuse with |
I could see this adapted to support the Swift formula on Linux at some point. Though first step there would be making the Swift formula work on Linux. |
@Bo98 pretty much echoed my thoughts. I figured out by reading |
@vladimyr Fine for this to not work on Linux for now if the formula doesn't but might be nice to make this either try to use the formula on Linux or fail unconditionally without it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew style
with your changes locally?brew tests
with your changes locally?Enable Swift formulas to depend on
:swift
requirement:which on macOS translates into following:
It simplifies the process of formula creation for Swift tools by automatic translation between Swift and Xcode versions. Previously authors were required to do manual translation and list resolved Xcode version as a requirement.