nushell / tree-sitter-nu

A tree-sitter grammar for nu-lang, the language of nushell
MIT License
122 stars 27 forks source link

clang linker command failed #115

Closed doongjohn closed 2 months ago

doongjohn commented 2 months ago

neovim version: v0.10.1 clang version: 19.1.0 OS: Windows 11

:TSInstall nu
nvim-treesitter[nu]: Error during compilation
clang: error: linker command failed with exit code 1120 (use -v to see invocation)^M 
fdncred commented 2 months ago

I assume that's because it's not compiling scanner.c. See https://github.com/nushell/tree-sitter-nu/pull/113#issuecomment-2371678047

/cc @mrdgo

mrdgo commented 2 months ago

How do you setup tree-sitter-nu?

siph commented 2 months ago

This broke for me too. I'm using nix to build and install the grammar and now neovim silently crashes whenever I open an nu file.

fdncred commented 2 months ago

I get a silent crash too, but it returns -1073741819 as an exit code.

doongjohn commented 2 months ago

How do you setup tree-sitter-nu?

I just added nushell/tree-sitter-nu as a dependency of nvim-treesitter/nvim-treesitter via Lazy nvim.

  'nvim-treesitter/nvim-treesitter',
  dependencies = {
    'nushell/tree-sitter-nu',
  },
  build = ':TSUpdate',
doongjohn commented 2 months ago

Btw the same config works fine in WSL2 (which has clang 18.1.8). Edit: Compilation works but nvim crash.

mrdgo commented 2 months ago

Ah okay, I can reproduce. It only happens on v0.10.1 - I am on nightly and have no issues.

@fdncred What do you think, we revert until I fixed the problem?

Edit: I won't be able to look into this before tomorrow evening (european time)

fdncred commented 2 months ago

Oh, glad you figured out that it's on 0.10.1. Yes, let's revert until we can find a way forward. I just landed the revert. https://github.com/nushell/tree-sitter-nu/pull/116

fdncred commented 2 months ago

I'm back to normal now. Closing this issue since the revert seems to have fixed it.