xi-editor / xi-mac

The xi-editor mac frontend.
Apache License 2.0
3.02k stars 147 forks source link

Doesn't compile for Swift 5 #465

Closed naclcaleb closed 4 years ago

naclcaleb commented 5 years ago

Xi-Mac Issue Template

Details

macOS version: 10.13.6

Error message:

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'XiCli')

Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'XiCliCore')

Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'XiEditor')

** BUILD FAILED **

Expected vs Actual

Expected: A successful build Actual: An error about Swift 5

Description

When following the installation instructions, everything goes fine until running xcodebuild, at which point I get the above error message. It seems that xi-mac doesn't support Swift 5?

naclcaleb commented 5 years ago

Xcode Version is 10.1

cmyr commented 5 years ago

Ah I see, I was confused. The problem is the inverse; we're using Swift 5, which requires Xcode 10.2, which requires macOS 10.14+.

Unfortunately, there isn't a real workaround outside of upgrading macOS, or reverting #464. :(

naclcaleb commented 5 years ago

Oh, I see now. I'm trying to figure out a workaround by downloading the Swift 5 toolchain.

naclcaleb commented 5 years ago

Never mind, it's going to take too much hacking of Xcode, which I don't want to mess around with as an iOS developer.

I'll try reverting #464

cmyr commented 5 years ago

Do you have the ability to update to 10.14? If you're doing regular Xcode work it's probably worth it, we're going to get new Xcode betas in a few weeks (WWDC) and they'll likely require 10.14, so might be worth upgrading now?

naclcaleb commented 5 years ago

Definitely would be worth it.

Except, I can't. It's a long story, but...

My mac is a mid-2007 iMac. It's not allowed to run anything above El Capitan.

But I was able to upgrade the CPU and WiFi card, and then use the High Sierra Patcher tool to upgrade to High Sierra.

Then I tried upgrading to Mojave...

There is a macOS Mojave patcher tool, which I tried, but this computer has a pre-metal graphics card, so the graphics are absolutely terrible.

But there was some sort of patch on Github that I used, and it looked pretty good.

Until I realized that my computer stopped being able to turn on, at which point I just went back to High Sierra.

cmyr commented 5 years ago

I understand!

What I would suggest is that you just locally revert #464, which should let everything build as usual.

isomorphisms commented 5 years ago

same, i think?

=== BUILD TARGET XiCliCore OF PROJECT XiEditor WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies
Swift is not supported for static libraries.

** BUILD FAILED **

The following build commands failed:
    Check dependencies
(1 failure)
isomorphisms commented 5 years ago

Forcing users to have the newest, fanciest Mac is bad. Graceful downgrading (like to old xcode) is good.

cmyr commented 5 years ago

I broadly agree; if we were distributing binaries I Would want to support back several OS versions. For development, however, I'm okay with keeping up with "latest - 1".

That said, I will concede that the move to 5.0 might have been a bit premature, it's annoying that we don't work on high sierra. 😒

naclcaleb commented 5 years ago

Yea, a lot of that blame can probably go to Apple for making things obsolete so quickly. The weird divide between El Capitan and Sierra was a big hurdle for me. Now I need to figure out a way to upgrade to Mojave with a graphics card that doesn't support Metal...

And now they're getting ready to release macOS Catalina?

peterkos commented 4 years ago

This seems to be an Xcode 10.1 <-> Swift 5 issue, not one w/ Xi editor. Could this issue be closed? (I don't mean to be dismissive, sorry! Just trying to look through a few issues to contribute to, and moving back a performance target from a year-old issue seems to be a bit out of scope.)

nangtrongvuon commented 4 years ago

Since xi-mac does compile with Swift 5, I’m going to close this issue.