npezza93 / ttags

Generate ctags using Tree Sitter
MIT License
20 stars 4 forks source link

Unable to install ttags v0.3.0 via cargo #16

Closed Bennet-Sunder closed 7 months ago

Bennet-Sunder commented 7 months ago

Hey I'm unable to install ttags via cargo. It looks like there is an issue with ttags and npezza93_tree-sitter-tags v0.21.0

Could you pls help with this?

% cargo install ttags

Updating crates.io index
Downloaded ttags v0.3.0 Downloaded 1 crate (15.4 KB) in 1.10s Installing ttags v0.3.0 Updating crates.io index Fetch [===========> ] 9 complete; 9 pending Fetch [==============> ] 32 complete; 8 pending Downloading 1 crate Downloading 2 crates Downloading 3 crates Downloading 4 crates Downloading 5 crates Downloading 6 crates Downloading 7 crates Downloading 8 crates Downloading 9 crates Downloading 10 crates Downloading 11 crates Downloading 12 crates Downloading 13 crates Downloading 14 crates Downloading 15 crates Downloading 16 crates Downloading 17 crates Downloading 18 crates Downloading 19 crates Downloading 20 crates Downloading 21 crates Fetch [=============================> ] 66 complete; 1 pending Downloading 22 crates Downloaded Inflector v0.11.4 Downloading 21 crates, remaining bytes: 221.9 KB Downloaded lsp-types v0.94.1 Downloaded vec_map v0.8.2 Downloaded serde_repr v0.1.19 Downloaded textwrap v0.11.0 Downloaded strsim v0.8.0 Downloaded lsp-server v0.7.6 Downloaded proc-macro2 v1.0.81 Downloaded serde_derive v1.0.198 Downloaded serde v1.0.198 Downloaded crossbeam-channel v0.5.12 Downloaded serde_json v1.0.116 Downloaded syn v2.0.60 Downloaded rayon v1.10.0 Downloaded clap v2.34.0 Downloaded sugar_path v0.0.9 Downloaded npezza93_tree-sitter-tags v0.21.0 Downloaded tree-sitter-nix v0.0.1 Downloaded tree-sitter-javascript v0.21.0 Downloaded tree-sitter-rust v0.21.0 Downloaded tree-sitter-swift v0.3.6 Downloaded npezza93-tree-sitter-haskell v0.14.1 Downloaded 22 crates (3.6 MB) in 2.60s (largest was npezza93-tree-sitter-haskell at 1.1 MB) Compiling cc v1.0.94 Compiling proc-macro2 v1.0.81 Compiling unicode-ident v1.0.12 Compiling memchr v2.7.2 Compiling regex-syntax v0.8.3 Compiling libc v0.2.153 Compiling crossbeam-utils v0.8.19 Compiling serde v1.0.198 Compiling tinyvec_macros v0.1.1 Compiling unicode-width v0.1.11 Compiling tinyvec v1.6.0 Compiling serde_json v1.0.116 Compiling textwrap v0.11.0 Compiling strsim v0.8.0 Compiling aho-corasick v1.1.3 Compiling unicode-normalization v0.1.23 Compiling vec_map v0.8.2 Compiling tree-sitter v0.22.5 Compiling regex-automata v0.4.6 Compiling tree-sitter v0.20.10 Compiling quote v1.0.36 Compiling syn v2.0.60 Compiling thiserror v1.0.58 Compiling regex v1.10.4 Compiling crossbeam-epoch v0.9.18 Compiling atty v0.2.14 Compiling unicode-bidi v0.3.15 Compiling bitflags v1.3.2 Compiling ansi_term v0.12.1 Compiling percent-encoding v2.3.1 Compiling rayon-core v1.12.1 Compiling itoa v1.0.11 Compiling ryu v1.0.17 Compiling form_urlencoded v1.2.1 Compiling idna v0.5.0 Compiling clap v2.34.0 Compiling crossbeam-deque v0.8.5 Compiling serde_derive v1.0.198 Compiling thiserror-impl v1.0.58 Compiling tree-sitter-nix v0.0.1 Compiling tree-sitter-ruby v0.20.1 Compiling tree-sitter-javascript v0.21.0 Compiling tree-sitter-rust v0.21.0 Compiling npezza93-tree-sitter-haskell v0.14.1 Compiling tree-sitter-swift v0.3.6 Compiling ttags v0.3.0 Compiling serde_repr v0.1.19 Compiling crossbeam-channel v0.5.12 Compiling lazy_static v1.4.0 Compiling once_cell v1.19.0 Compiling either v1.11.0 Compiling same-file v1.0.6 Compiling log v0.4.21 Compiling walkdir v2.5.0 Compiling url v2.5.0 Compiling lsp-types v0.94.1 Compiling lsp-server v0.7.6 Compiling rayon v1.10.0 Compiling sugar_path v0.0.9 Compiling Inflector v0.11.4 Compiling pathdiff v0.2.1 Compiling npezza93_tree-sitter-tags v0.21.0 error[E0308]: mismatched types --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ttags-0.3.0/src/haskell.rs:9:9 8 TagsConfiguration::new( ---------------------- arguments to this function are incorrect 9 npezza93_tree_sitter_haskell::language(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tree_sitter::Language, found a different tree_sitter::Language
= note: `tree_sitter::Language` and `tree_sitter::Language` have similar names, but are actually distinct types
note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.20.10/binding_rust/lib.rs:43:1 43 pub struct Language(*const ffi::TSLanguage); ^^^^^^^^^^^^^^^^^^^ note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.5/binding_rust/lib.rs:54:1
54 pub struct Language(*const ffi::TSLanguage);
^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `tree_sitter` are being used?

note: associated function defined here --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/npezza93_tree-sitter-tags-0.21.0/src/lib.rs:121:12 | 121 | pub fn new(language: Language, tags_query: &str, locals_query: &str) -> Result<Self, Error> { | ^^^

error[E0308]: mismatched types --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ttags-0.3.0/src/nix.rs:9:9 8 TagsConfiguration::new( ---------------------- arguments to this function are incorrect 9 tree_sitter_nix::language(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tree_sitter::Language, found a different tree_sitter::Language
= note: `tree_sitter::Language` and `tree_sitter::Language` have similar names, but are actually distinct types
note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.20.10/binding_rust/lib.rs:43:1 43 pub struct Language(*const ffi::TSLanguage); ^^^^^^^^^^^^^^^^^^^ note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.5/binding_rust/lib.rs:54:1
54 pub struct Language(*const ffi::TSLanguage);
^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `tree_sitter` are being used?

note: associated function defined here --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/npezza93_tree-sitter-tags-0.21.0/src/lib.rs:121:12 | 121 | pub fn new(language: Language, tags_query: &str, locals_query: &str) -> Result<Self, Error> { | ^^^

error[E0308]: mismatched types --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ttags-0.3.0/src/ruby.rs:12:9 11 TagsConfiguration::new( ---------------------- arguments to this function are incorrect 12 tree_sitter_ruby::language(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tree_sitter::Language, found a different tree_sitter::Language
= note: `tree_sitter::Language` and `tree_sitter::Language` have similar names, but are actually distinct types
note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.20.10/binding_rust/lib.rs:43:1 43 pub struct Language(*const ffi::TSLanguage); ^^^^^^^^^^^^^^^^^^^ note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.5/binding_rust/lib.rs:54:1
54 pub struct Language(*const ffi::TSLanguage);
^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `tree_sitter` are being used?

note: associated function defined here --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/npezza93_tree-sitter-tags-0.21.0/src/lib.rs:121:12 | 121 | pub fn new(language: Language, tags_query: &str, locals_query: &str) -> Result<Self, Error> { | ^^^

error[E0308]: mismatched types --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ttags-0.3.0/src/ruby.rs:141:25 141 parser.set_language(tree_sitter_ruby::language()).unwrap(); ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &Language, found Language
arguments to this method are incorrect

note: method defined here --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.5/binding_rust/lib.rs:457:12 | 457 | pub fn set_language(&mut self, language: &Language) -> Result<(), LanguageError> { | ^^^^^^^^^^^^

error[E0308]: mismatched types --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ttags-0.3.0/src/ruby.rs:145:28 145 let query = Query::new(tree_sitter_ruby::language(), DELEGATE_SCHEMA).unwrap(); ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &Language, found Language
arguments to this function are incorrect

note: associated function defined here --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.5/binding_rust/lib.rs:1749:12 | 1749 | pub fn new(language: &Language, source: &str) -> Result<Self, QueryError> { | ^^^

error[E0308]: mismatched types --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ttags-0.3.0/src/swift.rs:9:9 8 TagsConfiguration::new( ---------------------- arguments to this function are incorrect 9 tree_sitter_swift::language(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tree_sitter::Language, found a different tree_sitter::Language
= note: `tree_sitter::Language` and `tree_sitter::Language` have similar names, but are actually distinct types
note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.20.10/binding_rust/lib.rs:43:1 43 pub struct Language(*const ffi::TSLanguage); ^^^^^^^^^^^^^^^^^^^ note: tree_sitter::Language is defined in crate tree_sitter --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.5/binding_rust/lib.rs:54:1
54 pub struct Language(*const ffi::TSLanguage);
^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `tree_sitter` are being used?

note: associated function defined here --> /Users/bsunder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/npezza93_tree-sitter-tags-0.21.0/src/lib.rs:121:12 | 121 | pub fn new(language: Language, tags_query: &str, locals_query: &str) -> Result<Self, Error> { | ^^^

For more information about this error, try rustc --explain E0308. error: could not compile ttags (lib) due to 6 previous errors error: failed to compile ttags v0.3.0, intermediate artifacts can be found at /var/folders/nh/vdgbq5yn4wqbc5cmfspqc9hh0000gp/T/cargo-installSYOIgc. To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

Bennet-Sunder commented 7 months ago

I tried creating a new app with only ttags as a dependency and that throws the same error as well

npezza93 commented 7 months ago

Should be fixed in 0.3.5

Bennet-Sunder commented 7 months ago

Thank you.