facelessuser / sublime-regex

Python regex module for Sublime
2 stars 0 forks source link

support for arm64e apple silicon. #3

Open ghyatzo opened 2 years ago

ghyatzo commented 2 years ago

A recent package migrated to this package and upon launching it showed in the console ImportError: dlopen(/Users/user/Library/Application Support/Sublime Text/Packages/regex/st3_osx/_regex.so, 0x0002): tried: '/Users/user/Library/Application Support/Sublime Text/Packages/regex/st3_osx/_regex.so' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/_regex.so' (no such file)

I see there are (up to date?) sources in the bitbucket repo. In case what would be the steps to take to compile from source those and do an hot swap of the library.

facelessuser commented 2 years ago

ST3 currently runs on Python 3.3, so I would have to compile any CPU specific wheels. I've basically been holding off on upgrading the regex package for ST3 and Python 3.3. ST4 uses Python 3.8 which I could take advantage of prebuilt wheels from the regex project directly, but Package Control does not yet support Python 3.8.

To be a little more clear, I am anxiously awaiting to move forward with only updating for ST4. When I do update, it will be for ST4 and probably not ST3. When I do update, I'll have to see to what level of resolution Package Control will allow me to specify varying architectures.

I've considered possibly dropping maintenance of a regex dependency for Sublime as it is also kind of a pain, but currently, I'm still planning on maintaining this if/when Package Control supports ST4's Python 3.8.

ghyatzo commented 2 years ago

Thanks for the clarification. I guess i'll join in the anxious wait then!

Kamik423 commented 1 year ago

Having the same issue. Is there some sort of workaround?

Kamik423 commented 1 year ago

For now one way to get this working on macOS with M1/M2 chips is to always emulate ST using Rosetta and thus use the intel binaries. Right-Click the Sublime Text app in the Applications Folder and press Get Info. Then select Open using Rosetta.

Screenshot 2023-01-03 at 12 32 32
facelessuser commented 1 year ago

Good to hear a workaround. As soon as Package Control allows dependencies of Python 3.8, I can utilize the prebuilt wheels from the official project, but I feel like I've been saying that forever...Here's hoping package control releases sometime this year with Python 3.8 support.