tabnine-vscode icon indicating copy to clipboard operation
tabnine-vscode copied to clipboard

TabNine can't work on Apple Silicon M1

Open Du-Yao opened this issue 5 years ago • 2 comments

please complete the following information:

  • OS version: Mac Big Sur 11.1
  • Editor version [e.g. 1.45.0-insider]:1.53.0-insider
  • Programming language: [e.g. js, ts, c++]python
  • TabNine extension version:3.1.18

If the issue is related to TabNine failure, please provide log files:

Type TabNine::config in your editor, the logs are located at the bottom of the page

Editor console logs: Not anything.

Help -> Toggle Developer Tools

Issue Details: TabNine was installed in MacBook pro with Apple Silicon M1, but it didn't work. There was no error logs and no reflections just like TabNine was not exist.

Du-Yao avatar Dec 16 '20 13:12 Du-Yao

This issue is reproduced in all of Tabnine IDEs, therefore is more suitable for the general Tabnine repo. New issue created here: https://github.com/codota/TabNine/issues/308

talcodota avatar Dec 16 '20 14:12 talcodota

@Du-Yao @talcodota This is because of there is no arm64 version of TabNine binary now. But in macOS Big Sur, we can let it runs under Rosetta 2!

Add following lines in source code src/binary/paths.ts or in installed extension code(~/.vscode-exploration/extensions/tabnine.tabnine-vscode-version/out/binary/paths.js):

In getArch() function

    if (process.arch === "arm64") {
        return "arm64"
    }

and then duplicate x86_64-apple-darwin folder in 'binaries/$version' and rename it to arm64-apple-darwin.

Restart the VSCode Exploration then TabNine works again (under Rosetta 2 )!

Screen Shot 2020-12-28 at 11 37 05 AM

Detail: Make Tabnine Great Again on Apple M1 Chip

smoothdvd avatar Dec 28 '20 03:12 smoothdvd