EWSoftware / VSSpellChecker

A Visual Studio spell checker editor extension that checks the spelling of comments, strings, and plain text as you type. Supports configuration and various languages.
Other
377 stars 65 forks source link

Build for arm64 #270

Closed Youlean closed 1 year ago

Youlean commented 1 year ago

Visual Studio Community now works on arm and it is a good macOS m1 code editor. Will it be possible to build it for ARM?

I have managed to build it and install it, but spell checker doesn't work in the editor.

I think it has something to do with the dictionary load as it can't load it.

EWSoftware commented 1 year ago

Whether it works or not would largely depend on whether the other dependencies such as NHunSpell work as well. NHunSpell depends on the native code assemblies which are x86/x64. There's no way for me to know whether the Mac version of Visual Studio works the same way under the hood either. I don't use or have access to a Mac so this isn't something I will be able to pursue.

If you've managed to build it, the best bet would be to try and debug it by setting breakpoints where it creates the dictionaries to try to identify any points of failure. You might try further up the chain by setting breakpoints in the taggers to ensure that they are actually getting created as well when an editor is opened.

Youlean commented 1 year ago

This is not mac version of the visual studio but Windows ARM version. It's like regular VS but just built for arm64. I managed to build hunspell arm dll, but it is still faling to work. I will try to figure out how to debug this.

EWSoftware commented 1 year ago

Based on the following articles, it's likely not installing the extension at all. The VSIX manifest needs updating to specify that it supports the ARM64 architecture.

https://devblogs.microsoft.com/visualstudio/now-introducing-arm64-support-for-vs-extensions/ https://learn.microsoft.com/en-us/visualstudio/extensibility/arm64/target-arm64-visual-studio-extension?view=vs-2022

It's already set to build for AnyCPU and you may or may not have to update the SDK tools packages. The current NHunSpell NuGet package doesn't appear to support loading an ARM64 version of the native code DLL so it would likely have to be modified to support it. You'd likely have to clone a version of NHunSpell and make those changes to it.

If the VSIX manifest updates were made and an NHunSpell version could be used that supports the ARM64 DLL, I could likely build the package but I couldn't provide any actual support for ARM64 myself since I have no hardware to test it on.