I just upgraded to 2.0.17 and now any bundle that uses pre-compiled binaries in Bundle Support bundle fails to load due to the incompatible architectures:
/Users/christos/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': dlopen(/Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle, 9): no suitable image found. Did find: (LoadError) /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle: no matching architecture in universal wrapper /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle: no matching architecture in universal wrapper - /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle from /Users/christos/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/textmate.rb:4:in `<top (required)>' from /Users/christos/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from /Users/christos/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from /Users/christos/Library/Application Support/TextMate/Bundles/Linter.tmbundle/Support/lib/linter.rb:1:in `<top (required)>' from /Users/christos/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from /Users/christos/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from Lint/Strip/Ensure on Save:2:in `<main>'
I checked and the builds don't contain arm_64 architectures:
[~]> file "/Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle" /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle: Mach-O universal binary with 3 architectures: [ppc_7400:Mach-O bundle ppc_7400] [i386:Mach-O bundle i386] [x86_64:Mach-O 64-bit bundle x86_64] /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle (for architecture ppc7400): Mach-O bundle ppc_7400 /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle (for architecture i386): Mach-O bundle i386 /Users/christos/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle (for architecture x86_64): Mach-O 64-bit bundle x86_64
I can't even find the source for those binaries to try and build them. Any ideas?
On 5 Feb 2021, at 9:11, christos--- via TextMate wrote:
I just upgraded to 2.0.17 and now any bundle that uses pre-compiled binaries in Bundle Support bundle fails to load due to the incompatible architectures:
The error is from the plist.bundle which is a ruby extension.
However, I think this extension already has a problem with ruby 2.x and should only be used from ruby 1.8.7.
I can't even find the source for those binaries to try and build them. Any ideas?
The source is here: http://svn.textmate.org/trunk/Tools/plist/
I would be eager to know if you can build this for ARM and then fix the problem.
But I think the issue is the bundle command that indirectly require this, needs to have the shebang changed to this:
#!/usr/bin/env ruby18
I believe teh plist extension is primarily used to parse the output from DIALOG: I will add a JSON option to DIALOG so that we can use ruby’s native JSON parser instead, and hopefully phase out the plist extension.
On 5 Feb 2021, at 09:41, Allan Odgaard via TextMate textmate@lists.macromates.com wrote: I believe teh plist extension is primarily used to parse the output from DIALOG: I will add a JSON option to DIALOG so that we can use ruby’s native JSON parser instead, and hopefully phase out the plist extension.
That would be great.
On 5 Feb 2021, at 11:08, Jacob Carlborg via TextMate wrote:
On 5 Feb 2021, at 09:41, Allan Odgaard via TextMate textmate@lists.macromates.com wrote: I believe teh plist extension is primarily used to parse the output from DIALOG: I will add a JSON option to DIALOG so that we can use ruby’s native JSON parser instead, and hopefully phase out the plist extension.
That would be great.
Turned out to be easier said than done, especially as ruby 1.8.7 has no native support for JSON…
But I added a ruby native plist extension to the bundle support bundle (in a version that works with both ruby 1.8.7 and 2.x).
So now it should be possible for bundle commands to use ruby 2.x *and* the TextMate::UI library.
I looked over the other ruby files, and from a cursory glance, they all look like they _should_ work with ruby 2.x.
So now we just need to update and test the 8-900 bundle items with a ruby18 shebang, before we can get rid of ruby 1.x…
On 7 Mar 2021, at 14:10, Allan Odgaard via TextMate textmate@lists.macromates.com wrote: Turned out to be easier said than done, especially as ruby 1.8.7 has no native support for JSON…
Hm, yeah, it was a while since I used Ruby 1.8.7.
But I added a ruby native plist extension to the bundle support bundle (in a version that works with both ruby 1.8.7 and 2.x).
Great.
So now it should be possible for bundle commands to use ruby 2.x and the TextMate::UI library.
I looked over the other ruby files, and from a cursory glance, they all look like they should work with ruby 2.x.
Seems to be a minor issue with the `complete` method. I’ve created a pull request to fix it [1].
So now we just need to update and test the 8-900 bundle items with a ruby18 shebang, before we can get rid of ruby 1.x…
And then it’s time for Ruby 3 ;)
[1] https://github.com/textmate/bundle-support.tmbundle/pull/33
On 9 Mar 2021, at 20:05, Jacob Carlborg via TextMate wrote:
I looked over the other ruby files, and from a cursory glance, they all look like they should work with ruby 2.x.
Seems to be a minor issue with the `complete` method. I’ve created a pull request to fix it [1].
Thanks, I have merged and deployed the new version of the bundle.
Note though that the bundle requires TextMate v2.0.20 (because my dialog code changes require latest version of the dialog plug-in), so only users on pre-releases will see the updated bundle.
Thanks, I have merged and deployed the new version of the bundle.
Note though that the bundle requires TextMate v2.0.20 (because my dialog code changes require latest version of the dialog plug-in), so only users on pre-releases will see the updated bundle.
I'm using TextMate version 2.0.23, and I still get the error because plist.bundle does not support arm64. Should I expect this fix to be installed automatically, or do I need to download/install the ruby extension manually?
Quinn
On 28 Jan 2022, at 20:04, Quinn Comendant via TextMate wrote:
Note though that the bundle requires TextMate v2.0.20 (because my dialog code changes require latest version of the dialog plug-in), so only users on pre-releases will see the updated bundle.
I'm using TextMate version 2.0.23, and I still get the error because plist.bundle does not support arm64. Should I expect this fix to be installed automatically, or do I need to download/install the ruby extension manually?
It should work out-of-the-box.
There is a chance you just have local bundles eclipsing the updated version.
See https://github.com/textmate/textmate/wiki/Reverting-To-Defaults
If the problem persists, please let us know which command trigger the issue.
Hi Allan,
I have reverted TextMate to defaults, and I still have the error.
The command I'm trying to execute is “Show Scope (HTML)”, which is in the Bundle Development bundle. There are two issues, but the first one I already fixed:
1. First, this command doesn't run because the version of ruby18 installed by TextMate doesn't run on my M1 Pro MacBook Pro. Here's the error:
``` /Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/me/Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable /Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/me/Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0 ```
I solve this problem by downloading the source code for ruby-1.8.7-p374 and compiling locally for Apple Silicon. (I'm planning to write up a post to describe this process in case it's helpful for you to be able to distribute an ARM version with TextMate.)
2. With the ruby18 problem fixed, now the “Show Scope (HTML)” shows this error:
``` /Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle: dlopen(/Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle, 0x0009): tried: '/Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle' (fat file, but missing compatible architecture (have 'unknown,i386,x86_64', need 'arm64e')), '/usr/local/lib/plist.bundle' (no such file), '/usr/lib/plist.bundle' (no such file) - /Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/osx/plist.bundle (LoadError) from /Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/textmate.rb:5 from /Users/me/Library/Application Support/TextMate/Managed/Bundles/TextMate.tmbundle/Support/lib/doctohtml.rb:4:in `require' from /Users/me/Library/Application Support/TextMate/Managed/Bundles/TextMate.tmbundle/Support/lib/doctohtml.rb:4 from Show Scope (HTML):3:in `require' from Show Scope (HTML):3 ```
**The relevant part is that the `plist.bundle` file is “missing compatible architecture (have 'unknown,i386,x86_64', need 'arm64e')”.**
That's what I was referring to in my previous post that “plist.bundle does not support arm64”.
I'm on macOS 12.2 and running TextMate 2.0.23 which “is the latest version available” according to the Check for Test Build command.
Can anyone else confirm this command works or not on Apple Silicon?
Regards, Quinn
The error is from the plist.bundle which is a ruby extension.
[…]
The source is here: http://svn.textmate.org/trunk/Tools/plist/
``` ❯ host svn.textmate.org Host svn.textmate.org not found: 3(NXDOMAIN) ```
Did this source code move somewhere else?
Quinn