Closed N4tus closed 2 years ago
Wipe runtime/grammars/*
and do it again?
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.
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 👍
I’m also having this issue on Debian 11. I wiped runtime/grammars/*
and cloned again from git but nothing changed
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>
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
@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 :)
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
@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.
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
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
On master trying to build (
RUST_BACKTRACE=full cargo install --path helix-term
) results in the following error: