helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.65k stars 2.5k forks source link

Failed to fetch tree-sitter grammars #2398

Closed N4tus closed 2 years ago

N4tus commented 2 years ago

On master trying to build (RUST_BACKTRACE=full cargo install --path helix-term) results in the following error:

  Installing helix-term v0.6.0 (/d/dev/rust/helix/helix-term)
    Updating crates.io index
   Compiling helix-term v0.6.0 (/d/dev/rust/helix/helix-term)
error: failed to compile `helix-term v0.6.0 (/d/dev/rust/helix/helix-term)`, intermediate artifacts can be found at `/d/dev/rust/helix/target`

Caused by:
  failed to run custom build command for `helix-term v0.6.0 (/d/dev/rust/helix/helix-term)`

Caused by:
  process didn't exit successfully: `/d/dev/rust/helix/target/release/build/helix-term-85bb61dd1250ee19/build-script-build` (exit status: 101)
  --- stdout
  Grammar 'fish' is already up to date.
  Grammar 'protobuf' is already up to date.
  Grammar 'gomod' is already up to date.
  Grammar 'toml' is already up to date.
  Grammar 'rust' is already up to date.
  Grammar 'go' is already up to date.
  Grammar 'javascript' is already up to date.
  Grammar 'typescript' is already up to date.
  Grammar 'tsx' is already up to date.
  Grammar 'css' is already up to date.
  Grammar 'html' is already up to date.
  Grammar 'python' is already up to date.
  Grammar 'nix' is already up to date.
  Grammar 'ruby' is already up to date.
  Grammar 'php' is already up to date.
  Grammar 'twig' is already up to date.
  Grammar 'latex' is already up to date.
  Grammar 'lean' is already up to date.
  Grammar 'julia' is already up to date.
  Grammar 'java' is already up to date.
  Grammar 'ledger' is already up to date.
  Grammar 'ocaml' is already up to date.
  Grammar 'ocaml-interface' is already up to date.
  Grammar 'gowork' is already up to date.
  Grammar 'c' is already up to date.
  Grammar 'json' is already up to date.
  Grammar 'svelte' is already up to date.
  Grammar 'c-sharp' is already up to date.
  Grammar 'cpp' is already up to date.
  Grammar 'lua' is already up to date.
  Grammar 'vue' is already up to date.
  Grammar 'yaml' is already up to date.
  Grammar 'haskell' is already up to date.
  Grammar 'zig' is already up to date.
  Grammar 'tsq' is already up to date.
  Grammar 'cmake' is already up to date.
  Grammar 'make' is already up to date.
  Grammar 'glsl' is already up to date.
  Grammar 'perl' is already up to date.
  Grammar 'comment' is already up to date.
  Grammar 'wgsl' is already up to date.
  Grammar 'llvm' is already up to date.
  Grammar 'tablegen' is already up to date.
  Grammar 'llvm-mir' is already up to date.
  Grammar 'markdown' is already up to date.
  Grammar 'scala' is already up to date.
  Grammar 'git-diff' is already up to date.
  Grammar 'dart' is already up to date.
  Grammar 'dockerfile' is already up to date.
  Grammar 'git-commit' is already up to date.
  Grammar 'git-rebase' is already up to date.
  Grammar 'git-config' is already up to date.
  Grammar 'regex' is already up to date.
  Grammar 'elm' is already up to date.
  Grammar 'graphql' is already up to date.
  Grammar 'iex' is already up to date.
  Grammar 'rescript' is already up to date.
  Grammar 'kotlin' is already up to date.
  Grammar 'org' is already up to date.
  Grammar 'hcl' is already up to date.
  Grammar 'solidity' is already up to date.
  Grammar 'gleam' is already up to date.

  --- stderr
  thread 'main' panicked at 'Failed to fetch tree-sitter grammars: Failed to fetch some grammar(s)

  Caused by:
      Git command failed.
      Stdout:
      Stderr: error: remote origin already exists.
      ', helix-term/build.rs:21:26
  stack backtrace:
     0:     0x563f0399f14c - std::backtrace_rs::backtrace::libunwind::trace::h91c465e73bf6c785
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x563f0399f14c - std::backtrace_rs::backtrace::trace_unsynchronized::hae9da36f5d58b5f3
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x563f0399f14c - std::sys_common::backtrace::_print_fmt::h7f499fa126a7effb
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:67:5
     3:     0x563f0399f14c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3e2b509ce2ce6007
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:46:22
     4:     0x563f039c63ec - core::fmt::write::h753c7571fa063ecb
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/fmt/mod.rs:1168:17
     5:     0x563f03999ba3 - std::io::Write::write_fmt::h2815c0519c99ba09
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/io/mod.rs:1660:15
     6:     0x563f039a1832 - std::sys_common::backtrace::_print::h64941a6fc8b0ed9b
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:49:5
     7:     0x563f039a1832 - std::sys_common::backtrace::print::hcf25e43e1a9b0766
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:36:9
     8:     0x563f039a1832 - std::panicking::default_hook::{{closure}}::h78d3e6cf97fc623d
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:211:50
     9:     0x563f039a1415 - std::panicking::default_hook::hda898f8d3ad1a5ae
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:228:9
    10:     0x563f039a1e83 - std::panicking::rust_panic_with_hook::h1a5ea2d6c23051aa
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:606:17
    11:     0x563f039a1ba0 - std::panicking::begin_panic_handler::{{closure}}::h07f549390938b73f
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:502:13
    12:     0x563f0399f5f4 - std::sys_common::backtrace::__rust_end_short_backtrace::h5ec3758a92cfb00d
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:139:18
    13:     0x563f039a18d9 - rust_begin_unwind
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
    14:     0x563f03847521 - core::panicking::panic_fmt::h3a79a6a99affe1d5
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
    16:     0x563f038481ef - core::result::Result<T,E>::expect::h5386a6f786e44859
    17:     0x563f038488ec - build_script_build::main::hce29d67edf101eae
    18:     0x563f03848313 - core::ops::function::FnOnce::call_once::h33a8ef1dca3b5ae3
    19:     0x563f03848ea9 - std::sys_common::backtrace::__rust_begin_short_backtrace::hcbe44411168d3481
    20:     0x563f03848e89 - std::rt::lang_start::{{closure}}::h83c8e0cd329eea50
    21:     0x563f0399e800 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h443f738a8e9f947a
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/ops/function.rs:259:13
    22:     0x563f0399e800 - std::panicking::try::do_call::h1e21ba261ba489ec
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:406:40
    23:     0x563f0399e800 - std::panicking::try::h6afd48af8b6c96ac
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:370:19
    24:     0x563f0399e800 - std::panic::catch_unwind::h85dd95e0bab7fb60
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panic.rs:133:14
    25:     0x563f0399e800 - std::rt::lang_start_internal::{{closure}}::h038455e697c8b03e
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/rt.rs:128:48
    26:     0x563f0399e800 - std::panicking::try::do_call::h6b0ad65979f3077a
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:406:40
    27:     0x563f0399e800 - std::panicking::try::h010108d314169ac6
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:370:19
    28:     0x563f0399e800 - std::panic::catch_unwind::hff397f912b1535c2
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panic.rs:133:14
    29:     0x563f0399e800 - std::rt::lang_start_internal::h52e73755f77c7dd9
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/rt.rs:128:20
    30:     0x563f03848e71 - std::rt::lang_start::h64e79c71a815c354
    31:     0x563f03848b03 - main
  thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SendError { .. }', helix-loader/src/grammar.rs:136:35
    32:     0x7f002dd6efd0 - __libc_start_call_main
                                 at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    33:     0x7f002dd6f07d - __libc_start_main_impl
                                 at ./csu/../csu/libc-start.c:409:3
    34:     0x563f03847c95 - _start
    35:                0x0 - <unknown>
  stack backtrace:
     0:     0x563f0399f14c - std::backtrace_rs::backtrace::libunwind::trace::h91c465e73bf6c785
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x563f0399f14c - std::backtrace_rs::backtrace::trace_unsynchronized::hae9da36f5d58b5f3
                                 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x563f0399f14c - std::sys_common::backtrace::_print_fmt::h7f499fa126a7effb
archseer commented 2 years ago

Wipe runtime/grammars/* and do it again?

N4tus commented 2 years ago

removing runtime/grammars/* resulted in the same error for the first compilation, after that all subsequent compilations complain that there is no Cargo.toml file found in helix-term. (Indeed, the whole directory gone missing). So I deleted the entire helix directory and cloned it again. After that it worked.

the-mikedavis commented 2 years ago

Hmm interesting, the part about the remote origin already existing should be covered I would think. I can't reproduce locally so I'll close this out but do give a shout if you can find a way to reproduce this reliably 👍

m0xai commented 2 years ago

I’m also having this issue on Debian 11. I wiped runtime/grammars/* and cloned again from git but nothing changed

vvzen commented 2 years ago

Sorry to reopen, but I'm having a similar issue. I'm on CentOS Linux release 7.9.2009 (Core), using a freshly installed cargo 1.60.0 (d1fd9fe 2022-03-01).

Full traceback:

$ RUST_BACKTRACE=full cargo install --path helix-term
  Installing helix-term v0.6.0 (~/some-dir/helix/helix-term)
    Updating crates.io index
   Compiling helix-term v0.6.0 (~/some-dir/helix/helix-term)
error: failed to compile `helix-term v0.6.0 (~/some-dir/helix/helix-term)`, intermediate artifacts can be found at `~/some-dir/helix/target`

Caused by:
  failed to run custom build command for `helix-term v0.6.0 (~/some-dir/helix/helix-term)`

Caused by:
  process didn't exit successfully: `~/some-dir/helix/target/release/build/helix-term-56fa5edea1722cd0/build-script-build` (exit status: 101)
  --- stdout
  Grammar 'protobuf' checked out at '19c211a01434d9f03efff99f85e19f967591b175'.
  Grammar 'gowork' checked out at '6dd9dd79fb51e9f2abc829d5e97b15015b6a8ae2'.
  Grammar 'json' checked out at '65bceef69c3b0f24c0b19ce67d79f57c96e90fcb'.
  Grammar 'twig' checked out at 'b7444181fb38e603e25ea8fcdac55f9492e49c27'.
  Grammar 'gomod' checked out at 'e8f51f8e4363a3d9a427e8f63f4c1bbc5ef5d8d0'.
  Grammar 'ledger' checked out at '0cdeb0e51411a3ba5493662952c3039de08939ca'.
  Grammar 'lua' checked out at '6f5d40190ec8a0aa8c8410699353d820f4f7d7a6'.
  Grammar 'rust' checked out at 'a360da0a29a19c281d08295a35ecd0544d2da211'.
  Grammar 'css' checked out at '94e10230939e702b4fa3fa2cb5c3bc7173b95d07'.
  Grammar 'julia' checked out at '12ea597262125fc22fd2e91aa953ac69b19c26ca'.
  Grammar 'nix' checked out at '50f38ceab667f9d482640edfee803d74f4edeba5'.
  Grammar 'html' checked out at 'd93af487cc75120c89257195e6be46c999c6ba18'.
  Grammar 'nickel' checked out at 'c4dd1420b6cfeb6103d38eb1ce5195eb81197edc'.
  Grammar 'c' checked out at 'f05e279aedde06a25801c3f2b2cc8ac17fac52ae'.
  Grammar 'latex' checked out at '7f720661de5316c0f8fee956526d4002fa1086d8'.
  Grammar 'go' checked out at '0fa917a7022d1cd2e9b779a6a8fc5dc7fad69c75'.
  Grammar 'php' checked out at '57f855461aeeca73bd4218754fb26b5ac143f98f'.
  Grammar 'bash' checked out at '275effdfc0edce774acf7d481f9ea195c6c403cd'.
  Grammar 'ruby' checked out at 'dfff673b41df7fadcbb609c6338f38da3cdd018e'.
  Grammar 'cpp' checked out at 'e8dcc9d2b404c542fd236ea5f7208f90be8a6e89'.
  Grammar 'python' checked out at 'd6210ceab11e8d812d4ab59c07c81458ec6e5184'.
  Grammar 'fish' checked out at '04e54ab6585dfd4fee6ddfe5849af56f101b6d4f'.
  Grammar 'javascript' checked out at '4a95461c4761c624f2263725aca79eeaefd36cad'.
  Grammar 'java' checked out at 'bd6186c24d5eb13b4623efac9d944dcc095c0dad'.
  Grammar 'tsx' checked out at '3e897ea5925f037cfae2e551f8e6b12eec2a201a'.
  Grammar 'c-sharp' checked out at '53a65a908167d6556e1fcdb67f1ee62aac101dda'.
  Grammar 'typescript' checked out at '3e897ea5925f037cfae2e551f8e6b12eec2a201a'.
  Grammar 'elixir' checked out at '1dabc1c790e07115175057863808085ea60dd08a'.
  Grammar 'make' checked out at 'a4b9187417d6be349ee5fd4b6e77b4172c6827dd'.
  Grammar 'toml' checked out at '7cff70bbcbbc62001b465603ca1ea88edd668704'.
  Grammar 'tsq' checked out at 'b665659d3238e6036e22ed0e24935e60efb39415'.
  Grammar 'zig' checked out at '93331b8bd8b4ebee2b575490b2758f16ad4e9f30'.
  Grammar 'glsl' checked out at '88408ffc5e27abcffced7010fc77396ae3636d7e'.
  Grammar 'cmake' checked out at 'f6616f1e417ee8b62daf251aa1daa5d73781c596'.
  Grammar 'ocaml' checked out at '23d419ba45789c5a47d31448061557716b02750a'.
  Grammar 'ocaml-interface' checked out at '23d419ba45789c5a47d31448061557716b02750a'.
  Grammar 'llvm' checked out at '3b213925b9c4f42c1acfe2e10bfbb438d9c6834d'.
  Grammar 'dockerfile' checked out at '7af32bc04a66ab196f5b9f92ac471f29372ae2ce'.
  Grammar 'git-rebase' checked out at '332dc528f27044bc4427024dbb33e6941fc131f2'.                                                                                          [0/1137]
  Grammar 'lean' checked out at 'd98426109258b266e1e92358c5f11716d2e8f638'.
  Grammar 'graphql' checked out at '5e66e961eee421786bdda8495ed1db045e06b5fe'.
  Grammar 'git-config' checked out at '0e4f0baf90b57e5aeb62dcdbf03062c6315d43ea'.

  --- stderr
  thread 'main' panicked at 'Failed to fetch tree-sitter grammars: Failed to fetch some grammar(s)

  Caused by:
      Git command failed.
      Stdout:
      Stderr: error: no such remote ref bc26a6a949f2e0d98b7bfc437d459b250900a165
      ', helix-term/build.rs:21:26
  stack backtrace:
     0:     0x55d6c640fdfd - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x55d6c640fdfd - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x55d6c640fdfd - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5
     3:     0x55d6c640fdfd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h606862f787600875
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22
     4:     0x55d6c6436acc - core::fmt::write::he803f0f418caf762
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17
     5:     0x55d6c640af28 - std::io::Write::write_fmt::h70bc45872f37e7bb
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15
     6:     0x55d6c64120e7 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5
     7:     0x55d6c64120e7 - std::sys_common::backtrace::print::h359300b4a7fccf65
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9
     8:     0x55d6c64120e7 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22
     9:     0x55d6c6411db0 - std::panicking::default_hook::h03ca0f22e1d2d25e
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9
    10:     0x55d6c6412839 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:698:17
    11:     0x55d6c6412527 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13
    12:     0x55d6c64102c4 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
    13:     0x55d6c6412239 - rust_begin_unwind
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
    14:     0x55d6c62b2803 - core::panicking::panic_fmt::he1bbc7336d49a357
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
    15:     0x55d6c62b28f3 - core::result::unwrap_failed::h719f957ed74f93fd
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/result.rs:1749:5
    16:     0x55d6c62b3edf - core::result::Result<T,E>::expect::h1be03868e06c9727
    17:     0x55d6c62b3ad8 - build_script_build::main::hb5e8f9a487d99bd9
    18:     0x55d6c62b4153 - core::ops::function::FnOnce::call_once::hc7c3eb33e51ad300
    19:     0x55d6c62b3ff9 - std::sys_common::backtrace::__rust_begin_short_backtrace::hdbd2bce5cb90e483
    20:     0x55d6c62b4069 - std::rt::lang_start::{{closure}}::h8a04dcfe5907bc7c
    21:     0x55d6c640f4e1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb7014f43484a8b4e
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13
    22:     0x55d6c640f4e1 - std::panicking::try::do_call::h7bc9dc436daeb8c7
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
    23:     0x55d6c640f4e1 - std::panicking::try::h653d68a27ff5f175
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
    24:     0x55d6c640f4e1 - std::panic::catch_unwind::h9d739f9f59895e68
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
    25:     0x55d6c640f4e1 - std::rt::lang_start_internal::{{closure}}::hf006f2bc7ce22bbe
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48
    26:     0x55d6c640f4e1 - std::panicking::try::do_call::hfb39d6df61a2e69f
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
    27:     0x55d6c640f4e1 - std::panicking::try::h13e2d225134958ac
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
    28:     0x55d6c640f4e1 - std::panic::catch_unwind::h3bd49b5a5dfb1a50
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
    29:     0x55d6c640f4e1 - std::rt::lang_start_internal::h2ba92edce36c035e
                                 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20
    30:     0x55d6c62b4051 - std::rt::lang_start::he20a7df4feba13ae
    31:     0x55d6c62b3cd3 - main
    32:     0x7f8946533555 - __libc_start_main
    33:     0x55d6c62b3039 - <unknown>
    34:                0x0 - <unknown>
the-mikedavis commented 2 years ago

That revision is still in tree (actually it looks like the tree hasn't changed since we added it) https://git.sr.ht/~ecmma/tree-sitter-hare/commit/bc26a6a949f2e0d98b7bfc437d459b250900a165

Try rm -rf runtime/grammars/* and if that still fails consistently you may need to update git if it's very old

vvzen commented 2 years ago

@the-mikedavis thanks for replying! I tried re-cloning the whole directory, just to be safe, and then used the latest git that I had access to:

$ git --version
git version 2.9.5

but I'm still getting that same failure:

  --- stderr
  thread 'main' panicked at 'Failed to fetch tree-sitter grammars: Failed to fetch some grammar(s)

  Caused by:
      Git command failed.
      Stdout:
      Stderr: error: no such remote ref bc26a6a949f2e0d98b7bfc437d459b250900a165

I'll try to debug it a bit more, it would be nice to know exactly what git command it's running

EDIT: to anyone out there with the same issue, I suggest just disabling this grammar, unless you're interested in the niche hare programming language :)

the-mikedavis commented 2 years ago

That's a pretty old git version: 2.9 was from around 2016. It may not support shallow fetching at an exact revision, or it may be incompatible with source-hut's implementation on the server-side.

For reference, the code for fetching grammars is here: https://github.com/helix-editor/helix/blob/595213ca74e360d8de37fe7aa8f0f05ae6ec8f21/helix-loader/src/grammar.rs#L149-L195

vvzen commented 2 years ago

@the-mikedavis ha! pretty old - and to think that I just compiled it from scratch to update from 1.8, which is what I have at work :) Thanks a lot for the help, for now I just ignored that grammar by removing it from the languages.toml and the rest of the build went fine but I'm curious to know if the error is on source-hut or not. I'll try to compile helix from my home macOS too and see if that's just the old git the problem.

corvinux commented 2 years ago

Hi, I have some issues trying to compile from source on aarch64 GNU/Linux Debian GNU/Linux 9.13 with git --version 2.11.0, My branch is up-to-date with 'origin/master' --- stderr thread 'main' panicked at 'Failed to fetch tree-sitter grammars: Failed to fetch some grammar(s)

Caused by: Git command failed. Stdout: Stderr: error: no such remote ref bc26a6a949f2e0d98b7bfc437d459b250900a165 ', helix-term/build.rs:21:26 stack backtrace: 0: rust_begin_unwind at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14 2: core::result::unwrap_failed at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/result.rs:1785:5 3: core::result::Result<T,E>::expect 4: build_script_build::main 5: core::ops::function::FnOnce::call_once

dheater commented 2 years ago

I was able to get past this by downloading the latest git source (2.37) and build/install it.

NOTE: That I tried git version 2.2.5 from the sclo repo and it also failed.

After I installing git 2.37, I had a subsequent error:

  thread 'main' panicked at 'Failed to compile tree-sitter grammars: Failed to build some grammar(s)

  Caused by:
      Parser compilation failed.
      Stdout: 
      Stderr: /home/dheater/src/helix/runtime/grammars/sources/nickel/src/scanner.cc: In member function ‘unsigned int {anonymous}::Scanner::serialize(char*)’:
      /home/dheater/src/helix/runtime/grammars/sources/nickel/src/scanner.cc:47:26: error: range-based ‘for’ loops are not allowed in C++98 mode
           for (uint8_t count : expected_percent_count) {
                                ^
      In file included from /home/dheater/src/helix/runtime/grammars/sources/nickel/src/parser.c:1:0:
      /home/dheater/src/helix/runtime/grammars/sources/nickel/src/parser.c: In function ‘ts_lex_keywords’:
      /home/dheater/src/helix/runtime/grammars/sources/nickel/src/tree_sitter/parser.h:136:8: warning: variable ‘eof’ set but not used [-Wunused-but-set-variable]
         bool eof = false;             \
              ^
      /home/dheater/src/helix/runtime/grammars/sources/nickel/src/parser.c:2547:3: note: in expansion of macro ‘START_LEXER’
         START_LEXER();
         ^
      ', helix-term/build.rs:23:14

I was able to resolve this be installing/enabling devtooset-11