Closed jkmassel closed 3 years ago
@jkmassel I bumped Ruby to 2.7.2 as 2.6.4 does not easily compile (well, compile at all) on an arm64 Mac with rbenv. 2.7.2 just works. Hopefully that's cool?
Of course now I'm getting a crash in Ruby... 🤦
➜ WordPress-iOS-Shared git:(add/support-for-m1-machines) bundle exec pod install
Analyzing dependencies
/Users/aarondouglas/src/WordPress-iOS-Shared/vendor/bundle/ruby/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/options.rb:103: [BUG] Segmentation fault at 0x0000000000000002
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [arm64-darwin20]
I think this is the cursed CocoaPods crash people have been talking about. I'm kind of surprised I hadn't run into this with other projects yet. How much of this PR are we assuming is running against arm64 binaries vs. in Rosetta 2? Should Ruby be x86_64?
I think this is the cursed CocoaPods crash people have been talking about. I'm kind of surprised I hadn't run into this with other projects yet. How much of this PR are we assuming is running against arm64 binaries vs. in Rosetta 2? Should Ruby be x86_64?
For now, I think it's reasonable to assume folks are only ever using Ruby with x86_64
, yeah – it works fine and is far more stable, so for the immediate future I don't see a reason not to?
Hopefully that's cool?
Yes, it is very cool!
This PR adds M1 machine support by taking care of a few housekeeping things:
Since I'm doing housekeeping anyway, I also tackled a couple of small things:
FormatterKit
to useNSRelativeDateFormatter
instead given the fact thatFormatterKit
is deprecated. It slightly changes a couple of strings (as represented in the tests:just now
will be a localized version ofnow
, and1 day ago
will be replaced withyesterday
). If these changes aren't ok, we can probably special-case them, but IMHO using system-provided translation is an improvement as it is?