Require Xcode 10.2 on macOS 10.14
Xcode >=10.2 is required to build all Swift formulae on macOS >=10.14.4. Rather than requiring per-formula workarounds (e.g. Homebrew/homebrew-core#39446) this provides a more stable platform Homebrew can rely on for building Swift formulae.
This commit is contained in:
parent
cd51c9a511
commit
01a3425502
@ -27,7 +27,7 @@ module OS
|
|||||||
|
|
||||||
def minimum_version
|
def minimum_version
|
||||||
case MacOS.version
|
case MacOS.version
|
||||||
when "10.14" then "10.0"
|
when "10.14" then "10.2"
|
||||||
when "10.13" then "9.0"
|
when "10.13" then "9.0"
|
||||||
when "10.12" then "8.0"
|
when "10.12" then "8.0"
|
||||||
else "2.0"
|
else "2.0"
|
||||||
|
|||||||
@ -14,7 +14,6 @@ class XcodeRequirement < Requirement
|
|||||||
|
|
||||||
def xcode_installed_version
|
def xcode_installed_version
|
||||||
return false unless MacOS::Xcode.installed?
|
return false unless MacOS::Xcode.installed?
|
||||||
return false unless xcode_swift_compatability?
|
|
||||||
return true unless @version
|
return true unless @version
|
||||||
|
|
||||||
MacOS::Xcode.version >= @version
|
MacOS::Xcode.version >= @version
|
||||||
@ -26,12 +25,6 @@ class XcodeRequirement < Requirement
|
|||||||
A full installation of Xcode.app#{version} is required to compile
|
A full installation of Xcode.app#{version} is required to compile
|
||||||
this software. Installing just the Command Line Tools is not sufficient.
|
this software. Installing just the Command Line Tools is not sufficient.
|
||||||
EOS
|
EOS
|
||||||
unless xcode_swift_compatability?
|
|
||||||
message += <<~EOS
|
|
||||||
|
|
||||||
Xcode >=10.2 requires macOS >=10.14.4 to build many formulae.
|
|
||||||
EOS
|
|
||||||
end
|
|
||||||
if @version && Version.new(MacOS::Xcode.latest_version) < Version.new(@version)
|
if @version && Version.new(MacOS::Xcode.latest_version) < Version.new(@version)
|
||||||
message + <<~EOS
|
message + <<~EOS
|
||||||
|
|
||||||
@ -49,15 +42,4 @@ class XcodeRequirement < Requirement
|
|||||||
def inspect
|
def inspect
|
||||||
"#<#{self.class.name}: #{tags.inspect} version=#{@version.inspect}>"
|
"#<#{self.class.name}: #{tags.inspect} version=#{@version.inspect}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
# TODO: when 10.14.4 and 10.2 have been around for long enough remove this
|
|
||||||
# method in favour of requiring 10.14.4 and 10.2.
|
|
||||||
def xcode_swift_compatability?
|
|
||||||
return true if MacOS::Xcode.version < "10.2"
|
|
||||||
return true if MacOS.full_version >= "10.14.4"
|
|
||||||
|
|
||||||
MacOS.full_version < "10.14"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user