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

Cannot install VLS: Command failed git pull --rebase origin master

Open muuvmuuv opened this issue 3 years ago • 5 comments

I am trying to use VLS (to use fmt and stuff) but enabling and answering yes to install prints this to the output panel:

Error: Command failed: git pull --rebase origin master
fatal: Konnte Remote-Referenz master nicht finden.

Which makes sense since vlang/vls does not have a master ref...

muuvmuuv avatar Dec 06 '21 09:12 muuvmuuv

@muuvmuuv Hi! We are still in the works of providing better installation for VLS. Try manually clone the repo and visit https://github.com/vlang/vls#build-from-source for more details about this 🙂

nedpals avatar Dec 07 '21 02:12 nedpals

Thanks, I tried that, but unfortunately this produces a new error:

/D/__temp/vls on  use-tree-sitter is  v0.0.1 at 15:35:39
; v run build.vsh clang
> Building VLS...
v -gc boehm -keepc -cg -cc clang cmd/vls -o /Users/marvin/Development/__temp/vls/bin/vls
analyzer/symbol_registration.v:172:84: error: `void_sym` evaluated but not used
  170 | fn (mut sr SymbolAnalyzer) struct_field_decl(field_access SymbolAccess, field_decl_node C.TSNode) ?&Symbol {
  171 |     field_type_node := field_decl_node.child_by_field_name('type') ?
  172 |     field_sym := sr.store.find_symbol_by_type_node(field_type_node, sr.src_text) or { void_sym }
      |                                                                                       ~~~~~~~~
  173 |     field_name_node := field_decl_node.child_by_field_name('name') or {
  174 |         // struct embedding
Failed building VLS

/D/__temp/vls on  use-tree-sitter is  v0.0.1 at 15:35:49
; which v
/opt/homebrew/bin/v

/D/__temp/vls on  use-tree-sitter is  v0.0.1 at 15:36:04
; file `which v`
/opt/homebrew/bin/v: Mach-O 64-bit executable arm64

/D/__temp/vls on  use-tree-sitter is  v0.0.1 at 15:36:09
; v -v
V 0.2.4 b72a2de

muuvmuuv avatar Dec 07 '21 14:12 muuvmuuv

@muuvmuuv Your version of V is outdated. Update V and try compile VLS again.

nedpals avatar Dec 07 '21 23:12 nedpals

I am using homebrew to manage vlang versions, seems that one is a little behind ^^ I will use the official installer way now and try it again

muuvmuuv avatar Dec 09 '21 10:12 muuvmuuv

This works, thanks @nedpals

muuvmuuv avatar Dec 09 '21 10:12 muuvmuuv