gluon-lang / gluon_language-server Goto Github PK
View Code? Open in Web Editor NEWLanguage server providing completion for gluon
License: MIT License
Language server providing completion for gluon
License: MIT License
Would it be possible to bump the dependencies for a release of this?
Hi,
We noticed your extension in package.json
is using a "initialConfigurations"
contribution in a deprecated way by specifiying a command id.
We wanted to let you know that we plan to delete support for this specific use of "initialConfigurations" soon.
More about this deprecation can be found here and in our release notes.
A good example on how to use the DebugConfigurarationProvider
which is the new way of doing this can be found here
Also note other deprecations which are specified in our release notes (which can be found on our site).
Kind regards,
Isidor from the VSCode team
Try this code copied from gluon-lang/gluon#842.
type Digit a =
| One a
| Two a a
| Three a a a
| Four a a a a
type Node b =
| Node2 b b
| Node3 b b b
type FingerTree c =
| Empty
| Single c
| Deep (Digit c) (FingerTree (Node c)) (Digit c)
type View d =
| Nil
| View d (FingerTree d)
rec let viewl xs : FingerTree e -> View e =
match xs with
| Empty -> Nil
| Single x -> View x Empty
| Deep (One a) deeper suffix ->
match viewl deeper with
| View (Node2 b c) rest -> View a (Deep (Two b c) rest suffix)
| View (Node3 b c d) rest -> View a (Deep (Three b c d) rest suffix)
| Nil ->
match suffix with
| One w -> View a (Single w)
| Two w x -> View a (Deep (One w) Empty (One x))
| Three w x y -> View a (Deep (Two w x) Empty (One y))
| Four w x y z -> View a (Deep (Three w x y) Empty (One z))
| Deep (Two a b) deeper suffix -> View a (Deep (One b) deeper suffix)
| Deep (Three a b c) deeper suffix -> View a (Deep (Two b c) deeper suffix)
| Deep (Four a b c d) deeper suffix -> View a (Deep (Three b c d) deeper suffix)
viewl
Find this line type View d =
, modify the d
to a
, save the file. If nothing happens, modify a
back to d
, save. Repeat this procedure for a few times and the LSP would lock up.
Based on the experiences of my attempts to find out the problems, this probably happens here:
gluon_language-server/src/diagnostics.rs
Lines 340 to 342 in 5465972
But I didn't find out who is blocking it.
I note that debugserver-types is listed as a dependent package, but I can't see it used anywhere in this repo. Is it a redundant dependency?
The reason I went looking at this package is because it's the only listed reverse dependency of debugserver-types, and I wanted to try out debugserver-types, so was looking for an example :)
Running:
cargo install gluon_language-server
results in:
error: failed to compile
gluon_language-server v0.11.0`
This is caused by 2 different versions of the languageserver-types crate being compiled:
--> /home/tyler/.cargo/registry/src/github.com-1ecc6299db9ec823/gluon_language-server-0.11.0/src/command/mod.rs:115:20 | 115 | range: byte_span_to_range(source, symbol.span)?, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `languageserver_types::Range`, found a different struct `languageserver_types::Range` | = note: expected type `languageserver_types::Range` (struct `languageserver_types::Range`) found type `languageserver_types::Range` (struct `languageserver_types::Range`) note: Perhaps two different versions of crate `languageserver_types` are being used?
Compiling languageserver-types v0.54.0
Compiling languageserver-types v0.51.1
I can't get this crate to compile currently.
Trying cargo install --path .
on commit 9f5e9e3 fails with this output:
❯ cargo install --path .
Installing gluon_language-server v0.17.1-alpha.0 (/home/lordmzte/Downloads/gluon_language-server)
Updating crates.io index
Compiling unicode-xid v0.2.2
Compiling autocfg v1.0.1
Compiling proc-macro2 v1.0.29
Compiling syn v1.0.77
Compiling libc v0.2.103
Compiling log v0.4.14
Compiling cfg-if v1.0.0
Compiling memchr v2.4.1
Compiling serde v1.0.130
Compiling serde_derive v1.0.130
Compiling ryu v1.0.5
Compiling futures-core v0.3.17
Compiling fnv v1.0.7
Compiling slab v0.4.4
Compiling serde_json v1.0.68
Compiling bitflags v1.3.2
Compiling lazy_static v1.4.0
Compiling cfg-if v0.1.10
Compiling itoa v0.4.8
Compiling serde_derive_state v0.4.10
Compiling unicode-width v0.1.9
Compiling regex-syntax v0.6.25
Compiling termcolor v1.1.2
Compiling proc-macro-hack v0.5.19
Compiling futures-sink v0.3.17
Compiling smallvec v1.7.0
Compiling proc-macro-nested v0.1.7
Compiling futures-task v0.3.17
Compiling futures-channel v0.3.17
Compiling either v1.6.1
Compiling pin-project-lite v0.2.7
Compiling quick-error v1.2.3
Compiling cc v1.0.70
Compiling pkg-config v0.3.20
Compiling futures v0.1.31
Compiling pin-utils v0.1.0
Compiling arrayvec v0.5.2
Compiling vec_map v0.8.2
Compiling bytes v0.5.6
Compiling typed-arena v2.0.1
Compiling crunchy v0.2.2
Compiling futures-io v0.3.17
Compiling ahash v0.3.8
Compiling collect-mac v0.1.0
Compiling siphasher v0.3.7
Compiling getrandom v0.1.16
Compiling pin-project-lite v0.1.12
Compiling tinyvec_macros v0.1.0
Compiling anymap v0.12.1
Compiling hashbrown v0.11.2
Compiling tiny-keccak v2.0.2
Compiling parking_lot_core v0.8.5
Compiling precomputed-hash v0.1.1
Compiling new_debug_unreachable v1.0.4
Compiling bytes v1.1.0
Compiling bit-vec v0.6.3
Compiling fixedbitset v0.2.0
Compiling matches v0.1.9
Compiling openssl v0.10.36
Compiling static_assertions v0.3.4
Compiling diff v0.1.12
Compiling unicode-bidi v0.3.6
Compiling pico-args v0.4.2
Compiling percent-encoding v2.1.0
Compiling foreign-types-shared v0.1.1
Compiling scopeguard v1.1.0
Compiling same-file v1.0.6
Compiling native-tls v0.2.8
Compiling httparse v1.5.1
Compiling async-trait v0.1.51
Compiling once_cell v1.8.0
Compiling unicode-segmentation v1.8.0
Compiling strsim v0.10.0
Compiling ppv-lite86 v0.2.10
Compiling openssl-probe v0.1.4
Compiling try-lock v0.2.3
Compiling base64 v0.12.3
Compiling gluon_vm v0.17.2
Compiling rustc-hash v1.1.0
Compiling oorandom v11.1.3
Compiling anyhow v1.0.44
Compiling httpdate v0.3.2
Compiling tower-service v0.3.1
Compiling downcast-rs v1.2.0
Compiling frunk_core v0.3.2
Compiling ansi_term v0.11.0
Compiling strsim v0.8.0
Compiling gluon_language-server v0.17.1-alpha.0 (/home/lordmzte/Downloads/gluon_language-server)
Compiling instant v0.1.11
Compiling tracing-core v0.1.20
Compiling num-traits v0.2.14
Compiling indexmap v1.7.0
Compiling hashbrown v0.8.2
Compiling futures-macro v0.3.17
Compiling futures-util v0.3.17
Compiling crossbeam-utils v0.7.2
Compiling textwrap v0.11.0
Compiling humantime v1.3.0
Compiling itertools v0.10.1
Compiling itertools v0.9.0
Compiling pretty v0.10.0
Compiling phf_shared v0.8.0
Compiling tinyvec v1.5.0
Compiling bit-set v0.5.2
Compiling http v0.2.5
Compiling archery v0.3.0
Compiling form_urlencoded v1.0.1
Compiling foreign-types v0.3.2
Compiling openssl-sys v0.9.67
Compiling lock_api v0.4.5
Compiling walkdir v2.3.2
Compiling heck v0.3.3
Compiling string_cache v0.8.1
Compiling rpds v0.7.0
Compiling unicode-normalization v0.1.19
Compiling tracing v0.1.28
Compiling ena v0.14.0
Compiling want v0.3.0
Compiling aho-corasick v0.7.18
Compiling combine v4.6.1
Compiling quote v1.0.9
Compiling http-body v0.3.1
Compiling net2 v0.2.37
Compiling iovec v0.1.4
Compiling num_cpus v1.13.0
Compiling signal-hook-registry v1.4.0
Compiling atty v0.2.14
Compiling socket2 v0.3.19
Compiling dirs-sys-next v0.1.2
Compiling idna v0.2.3
Compiling regex v1.5.4
Compiling mio v0.6.23
Compiling rand_core v0.5.1
Compiling ordered-float v2.8.0
Compiling parking_lot v0.11.2
Compiling clap v2.33.3
Compiling dirs-next v2.0.0
Compiling petgraph v0.5.1
Compiling rand_chacha v0.2.2
Compiling rand_xorshift v0.2.0
Compiling mio-uds v0.6.8
Compiling lalrpop-util v0.19.6
Compiling env_logger v0.7.1
Compiling term v0.7.0
Compiling Inflector v0.11.4
Compiling rand v0.7.3
Compiling ascii-canvas v3.0.0
Compiling lalrpop v0.19.6
Compiling gluon_codegen v0.17.2
Compiling tokio-macros v0.2.6
Compiling pin-project-internal v1.0.8
Compiling serde_repr v0.1.7
Compiling gluon-salsa-macros v0.15.2
Compiling tokio v0.2.25
Compiling pin-project v1.0.8
Compiling tracing-futures v0.2.5
Compiling futures-executor v0.3.17
Compiling gluon-salsa v0.15.2
Compiling futures v0.3.17
Compiling tokio-util v0.3.1
Compiling tokio-native-tls v0.1.0
Compiling async-pipe v0.1.3
Compiling h2 v0.2.7
Compiling gluon_parser v0.17.2
Compiling codespan-reporting v0.9.5
Compiling serde_state v0.4.8
Compiling url v2.2.2
Compiling codespan v0.9.5
Compiling lsp-types v0.79.0
Compiling jsonrpc-core v14.2.0
Compiling lsp-types v0.77.0
Compiling schemafy_core v0.5.2
Compiling gluon_base v0.17.2
Compiling hyper v0.13.10
Compiling schemafy_lib v0.5.2
Compiling gluon_check v0.17.2
Compiling gluon_format v0.17.2
Compiling gluon_completion v0.17.2
Compiling schemafy v0.5.2
Compiling debugserver-types v0.5.0
Compiling codespan-lsp v0.10.1
Compiling gluon v0.17.2
error[E0308]: mismatched types
--> src/lib.rs:59:65
|
59 | let index = codespan_lsp::position_to_byte_index(files, (), position)?;
| ^^^^^^^^ expected struct `lsp_types::Position`, found a different struct `lsp_types::Position`
|
= note: expected reference `&lsp_types::Position` (struct `lsp_types::Position`)
found reference `&lsp_types::Position` (struct `lsp_types::Position`)
= note: perhaps two different versions of crate `lsp_types` are being used?
error[E0308]: mismatched types
--> src/lib.rs:70:5
|
67 | ) -> Result<lsp_types::Range, codespan_lsp::Error> {
| --------------------------------------------- expected `Result<lsp_types::Range, codespan_lsp::Error>` because of return type
...
70 | codespan_lsp::byte_span_to_range(files, (), range)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `lsp_types::Range`, found a different struct `lsp_types::Range`
|
= note: expected enum `Result<lsp_types::Range, _>` (struct `lsp_types::Range`)
found enum `Result<lsp_types::Range, _>` (struct `lsp_types::Range`)
= note: perhaps two different versions of crate `lsp_types` are being used?
error[E0308]: mismatched types
--> src/text_edit.rs:108:13
|
108 | &range,
| ^^^^^^ expected struct `lsp_types::Range`, found a different struct `lsp_types::Range`
|
= note: expected reference `&lsp_types::Range` (struct `lsp_types::Range`)
found reference `&lsp_types::Range` (struct `lsp_types::Range`)
= note: perhaps two different versions of crate `lsp_types` are being used?
For more information about this error, try `rustc --explain E0308`.
error: could not compile `gluon_language-server` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `gluon_language-server v0.17.1-alpha.0 (/home/lordmzte/Downloads/gluon_language-server)`, intermediate artifacts can be found at `/home/lordmzte/Downloads/gluon_language-server/target`
Caused by:
build failed
and with the --locked
flag, it also fails with a different output:
❯ cargo install --path . --locked
Installing gluon_language-server v0.17.1-alpha.0 (/home/lordmzte/Downloads/gluon_language-server)
Updating crates.io index
warning: package `arc-swap v0.4.7` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `futures v0.3.5` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `futures-util v0.3.5` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `miow v0.2.1` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `miow v0.3.5` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `net2 v0.2.34` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `pin-project-lite v0.1.7` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `socket2 v0.3.12` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
Compiling proc-macro2 v1.0.19
Compiling unicode-xid v0.2.1
Compiling syn v1.0.38
Compiling autocfg v1.0.0
Compiling libc v0.2.74
Compiling serde v1.0.115
Compiling serde_derive v1.0.115
Compiling log v0.4.11
Compiling memchr v2.3.3
Compiling bitflags v1.2.1
Compiling slab v0.4.2
Compiling serde_json v1.0.57
Compiling futures-core v0.3.5
Compiling unicode-width v0.1.8
Compiling regex-syntax v0.6.18
Compiling byteorder v1.3.4
Compiling pin-project-internal v0.4.23
Compiling itoa v0.4.6
Compiling typenum v1.12.0
Compiling termcolor v1.1.0
Compiling proc-macro-nested v0.1.6
Compiling smallvec v1.4.2
Compiling futures-sink v0.3.5
Compiling cfg-if v0.1.10
Compiling futures v0.1.29
Compiling cc v1.0.58
Compiling once_cell v1.4.0
Compiling pkg-config v0.3.18
Compiling proc-macro-hack v0.5.18
Compiling either v1.6.0
Compiling byte-tools v0.3.1
Compiling arc-swap v0.4.7
Compiling arrayvec v0.5.1
Compiling futures-io v0.3.5
Compiling getrandom v0.1.14
Compiling pin-project-lite v0.1.7
Compiling siphasher v0.3.3
Compiling opaque-debug v0.2.3
Compiling fake-simd v0.1.2
Compiling strsim v0.9.3
Compiling bit-vec v0.6.2
Compiling tinyvec v0.3.3
Compiling instant v0.1.6
Compiling openssl v0.10.30
Compiling matches v0.1.8
Compiling lalrpop-util v0.19.0
Compiling native-tls v0.2.4
Compiling unicode-segmentation v1.6.0
Compiling httparse v1.3.4
Compiling openssl-probe v0.1.2
Compiling gluon_vm v0.17.1
Compiling ppv-lite86 v0.2.8
Compiling oorandom v11.1.2
Compiling anyhow v1.0.32
Compiling frunk_core v0.3.1
Compiling tower-service v0.3.0
Compiling tracing-core v0.1.14
Compiling thread_local v1.0.1
Compiling textwrap v0.11.0
Compiling hashbrown v0.8.2
Compiling num-traits v0.2.12
Compiling indexmap v1.5.1
Compiling crossbeam-utils v0.7.2
Compiling http v0.2.1
Compiling futures-channel v0.3.5
Compiling futures-task v0.3.5
Compiling block-padding v0.1.5
Compiling itertools v0.9.0
Compiling pretty v0.10.0
Compiling phf_shared v0.8.0
Compiling bit-set v0.5.2
Compiling unicode-bidi v0.3.4
Compiling lock_api v0.4.1
Compiling unicode-normalization v0.1.13
Compiling walkdir v2.3.1
Compiling openssl-sys v0.9.58
Compiling heck v0.3.1
Compiling idna v0.2.0
Compiling http-body v0.3.1
Compiling ena v0.14.0
Compiling tracing v0.1.19
Compiling want v0.3.0
Compiling aho-corasick v0.7.13
Compiling combine v4.2.1
Compiling quote v1.0.7
Compiling dirs v1.0.5
Compiling atty v0.2.14
Compiling iovec v0.1.4
Compiling net2 v0.2.34
Compiling num_cpus v1.13.0
Compiling signal-hook-registry v1.2.1
Compiling parking_lot_core v0.8.0
Compiling socket2 v0.3.12
Compiling time v0.1.43
Compiling generic-array v0.12.3
Compiling term v0.5.2
Compiling regex v1.3.9
Compiling mio v0.6.22
Compiling rand_core v0.5.1
Compiling parking_lot v0.11.0
Compiling clap v2.33.3
Compiling ordered-float v2.0.0
Compiling block-buffer v0.7.3
Compiling digest v0.8.1
Compiling ascii-canvas v2.0.0
Compiling petgraph v0.5.1
Compiling rand_chacha v0.2.2
Compiling rand_xorshift v0.2.0
Compiling mio-uds v0.6.8
Compiling env_logger v0.7.1
Compiling sha2 v0.8.2
Compiling Inflector v0.11.4
Compiling rand v0.7.3
Compiling serde_derive_state v0.4.9
Compiling gluon_codegen v0.17.1
Compiling futures-macro v0.3.5
Compiling tokio-macros v0.2.5
Compiling serde_repr v0.1.6
Compiling async-trait v0.1.37
Compiling gluon-salsa-macros v0.15.2
Compiling tokio v0.2.22
Compiling pin-project v0.4.23
Compiling futures-util v0.3.5
Compiling tokio-util v0.3.1
Compiling tokio-native-tls v0.1.0
Compiling async-pipe v0.1.3
Compiling futures-executor v0.3.5
Compiling h2 v0.2.6
Compiling gluon-salsa v0.15.2
Compiling futures v0.3.5
Compiling docopt v1.1.0
Compiling string_cache v0.8.0
Compiling codespan-reporting v0.9.5
Compiling serde_state v0.4.7
Compiling url v2.1.1
Compiling codespan v0.9.5
Compiling lalrpop v0.19.0
Compiling schemafy_core v0.5.1
Compiling lsp-types v0.77.0
Compiling jsonrpc-core v14.2.0
Compiling schemafy_lib v0.5.1
Compiling hyper v0.13.7
Compiling gluon_base v0.17.1
error: expected one of `{`, lifetime, or type, found `,`
--> /home/lordmzte/.cargo/registry/src/github.com-1ecc6299db9ec823/gluon_base-0.17.1/src/types/mod.rs:550:17
|
550 | #[derive(Clone, AstClone)]
| ^^^^^^^^ unexpected token
...
571 | T: TypePtr<Id = Id>,
| - expected one of `{`, lifetime, or type
|
= note: this error originates in the derive macro `AstClone` (in Nightly builds, run with -Z macro-backtrace for more info)
error: proc-macro derive produced unparseable tokens
--> /home/lordmzte/.cargo/registry/src/github.com-1ecc6299db9ec823/gluon_base-0.17.1/src/types/mod.rs:550:17
|
550 | #[derive(Clone, AstClone)]
| ^^^^^^^^
Compiling schemafy v0.5.1
error[E0277]: the trait bound `AliasRef<Id, T>: AstClone<'_, _>` is not satisfied
--> /home/lordmzte/.cargo/registry/src/github.com-1ecc6299db9ec823/gluon_base-0.17.1/src/types/mod.rs:914:45
|
914 | #[derive(Clone, Debug, Eq, PartialEq, Hash, AstClone)]
| ^^^^^^^^ the trait `AstClone<'_, _>` is not implemented for `AliasRef<Id, T>`
|
note: required by `AstClone::ast_clone`
--> /home/lordmzte/.cargo/registry/src/github.com-1ecc6299db9ec823/gluon_base-0.17.1/src/ast.rs:1509:5
|
1509 | fn ast_clone(&self, arena: ArenaRef<'_, 'ast, Id>) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the derive macro `AstClone` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `gluon_base` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `gluon_language-server v0.17.1-alpha.0 (/home/lordmzte/Downloads/gluon_language-server)`, intermediate artifacts can be found at `/home/lordmzte/Downloads/gluon_language-server/target`
Caused by:
build failed
1.55.0
Arch linux
Hello @Laegluin , Hello @marves
I want to make a language server for config files and I want to use your work from this repository, especially the stuff that glues together rcp, tokio and decoding. I'll refactor that out into a standalone lib as far as possible.
I don't know yet if I publish that on crates.io, because I am usually not able to provide long term maintenance, but in the case I do publish, I want to ask you if and how you would like to be credited for your work.
Thanks for your work,
Daniel
When looking for gluon_language-server
using the gluon.language-server.path
variable, the extension should add ~/.cargo/bin/
to $PATH
prior to searching for the command. This way no configuration will be necessary for anyone who runs cargo install gluon_language-server
.
If you want to be smarter, you could reproduce Cargo's logic for determining where to install ($CARGO_INSTALL_ROOT
, followed by the install.root
cargo key, then $CARGO_HOME
, and then finally $HOME/.cargo
), but the simplistic approach of just adding ~/.cargo/bin
would cover the default un-customized case (which is probably most people).
...
Compiling gluon_parser v0.9.2
Compiling gluon_format v0.9.2
Compiling gluon_format v0.9.2
Compiling gluon_language-server v0.9.0
error[E0507]: cannot move out of borrowed content
--> src/lib.rs:984:47
|
984 | .map(|(k, v)| (k.clone(), *v))
| ^^ cannot move out of borrowed content
error: aborting due to previous error
For more information about this error, try `rustc --explain E0507`.
error: failed to compile `gluon_language-server v0.9.0`, intermediate artifacts can be found at `/var/folders/bk/ln25956d4l3gsdg7lchhf6cw0000gp/T/cargo-installar97y6`
Caused by:
Could not compile `gluon_language-server`.
To learn more, run the command again with --verbose.
! docker-for-desktop ~/code ```
Try open this file:
type T a =
| Empty
type U a = (T a, T a)
()
Then I will get:
thread 'main' panicked at 'attempt to subtract with overflow', src/lib.rs:69:17
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1076
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1537
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:198
9: std::panicking::default_hook
at src/libstd/panicking.rs:218
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:486
11: rust_begin_unwind
at src/libstd/panicking.rs:388
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:101
13: core::panicking::panic
at src/libcore/panicking.rs:56
14: gluon_language_server::byte_span_to_range
at src/lib.rs:69
15: gluon_language_server::command::completion_symbol_to_document_symbol
at src/command/mod.rs:145
16: gluon_language_server::command::completion_symbols_to_document_symbols_inner::{{closure}}
at src/command/mod.rs:130
17: core::iter::adapters::map_try_fold::{{closure}}
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:837
18: core::iter::adapters::filter_try_fold::{{closure}}
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:979
19: core::iter::traits::iterator::Iterator::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:1889
20: <core::iter::adapters::Filter<I,P> as core::iter::traits::iterator::Iterator>::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:1028
21: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:863
22: <core::iter::adapters::ResultShunt<I,E> as core::iter::traits::iterator::Iterator>::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:2631
23: core::iter::traits::iterator::Iterator::find
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:2231
24: <core::iter::adapters::ResultShunt<I,E> as core::iter::traits::iterator::Iterator>::next
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:2613
25: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/vec.rs:2076
26: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/vec.rs:1978
27: core::iter::traits::iterator::Iterator::collect
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:1671
28: <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter::{{closure}}
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:1537
29: core::iter::adapters::process_results
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:2602
30: <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:1537
31: core::iter::traits::iterator::Iterator::collect
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:1671
32: gluon_language_server::command::completion_symbols_to_document_symbols_inner
at src/command/mod.rs:120
33: gluon_language_server::command::completion_symbol_to_document_symbol
at src/command/mod.rs:165
34: gluon_language_server::command::completion_symbols_to_document_symbols_inner::{{closure}}
at src/command/mod.rs:130
35: core::iter::adapters::map_try_fold::{{closure}}
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:837
36: core::iter::adapters::filter_try_fold::{{closure}}
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:979
37: core::iter::traits::iterator::Iterator::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:1889
38: <core::iter::adapters::Filter<I,P> as core::iter::traits::iterator::Iterator>::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:1028
39: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:863
40: <core::iter::adapters::ResultShunt<I,E> as core::iter::traits::iterator::Iterator>::try_fold
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:2631
41: core::iter::traits::iterator::Iterator::find
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:2231
42: <core::iter::adapters::ResultShunt<I,E> as core::iter::traits::iterator::Iterator>::next
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:2613
43: alloc::vec::Vec<T>::extend_desugared
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/vec.rs:2200
44: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::spec_extend
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/vec.rs:2093
45: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/vec.rs:2088
46: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/vec.rs:1978
47: core::iter::traits::iterator::Iterator::collect
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:1671
48: <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter::{{closure}}
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:1537
49: core::iter::adapters::process_results
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/adapters/mod.rs:2602
50: <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:1537
51: core::iter::traits::iterator::Iterator::collect
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/iter/traits/iterator.rs:1671
52: gluon_language_server::command::completion_symbols_to_document_symbols_inner
at src/command/mod.rs:120
53: gluon_language_server::command::completion_symbols_to_document_symbols
at src/command/mod.rs:112
54: gluon_language_server::command::document_symbols::register::{{closure}}::{{closure}}::{{closure}}
at src/command/document_symbols.rs:19
55: gluon_language_server::command::retrieve_expr::{{closure}}
at src/command/mod.rs:236
56: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:73
57: gluon_language_server::command::document_symbols::register::{{closure}}::{{closure}}
at src/command/document_symbols.rs:12
58: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:73
59: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
at futures-util-0.3.5/src/future/future/map.rs:67
60: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
at futures-util-0.3.5/src/lib.rs:107
61: <core::pin::Pin<P> as core::future::future::Future>::poll
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/future.rs:118
62: <F as futures_core::future::TryFuture>::try_poll
at futures-core-0.3.5/src/future.rs:83
63: <futures_util::compat::compat03as01::Compat<Fut> as futures::future::Future>::poll::{{closure}}
at futures-util-0.3.5/src/compat/compat03as01.rs:121
64: futures_util::compat::compat03as01::with_context
at futures-util-0.3.5/src/compat/compat03as01.rs:223
65: <futures_util::compat::compat03as01::Compat<Fut> as futures::future::Future>::poll
at futures-util-0.3.5/src/compat/compat03as01.rs:121
66: <alloc::boxed::Box<F> as futures::future::Future>::poll
at futures-0.1.29/src/future/mod.rs:113
67: <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll
at futures-0.1.29/src/future/lazy.rs:82
68: futures::future::chain::Chain<A,B,C>::poll
at futures-0.1.29/src/future/chain.rs:26
69: <futures::future::then::Then<A,B,F> as futures::future::Future>::poll
at futures-0.1.29/src/future/then.rs:32
70: <alloc::boxed::Box<F> as futures::future::Future>::poll
at futures-0.1.29/src/future/mod.rs:113
71: <futures::future::either::Either<A,B> as futures::future::Future>::poll
at futures-0.1.29/src/future/either.rs:35
72: <futures::future::either::Either<A,B> as futures::future::Future>::poll
at futures-0.1.29/src/future/either.rs:36
73: <futures::future::map::Map<A,F> as futures::future::Future>::poll
at futures-0.1.29/src/future/map.rs:30
74: <futures::future::either::Either<A,B> as futures::future::Future>::poll
at futures-0.1.29/src/future/either.rs:35
75: <futures::future::either::Either<A,B> as futures::future::Future>::poll
at futures-0.1.29/src/future/either.rs:36
76: <futures::future::either::Either<A,B> as futures::future::Future>::poll
at futures-0.1.29/src/future/either.rs:36
77: <futures::future::map::Map<A,F> as futures::future::Future>::poll
at futures-0.1.29/src/future/map.rs:30
78: core::ops::function::FnOnce::call_once
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
79: futures::task_impl::Spawn<T>::enter::{{closure}}
at futures-0.1.29/src/task_impl/mod.rs:399
80: futures::task_impl::std::set
at futures-0.1.29/src/task_impl/std/mod.rs:83
81: futures::task_impl::Spawn<T>::enter
at futures-0.1.29/src/task_impl/mod.rs:399
82: futures::task_impl::Spawn<T>::poll_fn_notify
at futures-0.1.29/src/task_impl/mod.rs:291
83: futures_util::compat::compat01as03::Compat01As03<T>::in_notify
at futures-util-0.3.5/src/compat/compat01as03.rs:42
84: <futures_util::compat::compat01as03::Compat01As03<Fut> as core::future::future::Future>::poll
at futures-util-0.3.5/src/compat/compat01as03.rs:162
85: gluon_language_server::server::Server::start::{{closure}}::{{closure}}::{{closure}}
at Project/gluon_language-server/src/server.rs:124
86: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:73
87: <F as futures_core::future::TryFuture>::try_poll
at futures-core-0.3.5/src/future.rs:83
88: <futures_util::stream::try_stream::try_for_each::TryForEach<St,Fut,F> as core::future::future::Future>::poll
at futures-util-0.3.5/src/stream/try_stream/try_for_each.rs:59
89: gluon_language_server::server::Server::start::{{closure}}
at Project/gluon_language-server/src/server.rs:118
90: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:73
91: gluon_language_server::run::{{closure}}
at Project/gluon_language-server/src/lib.rs:36
92: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:73
93: gluon_language_server::main::{{closure}}
at src/main.rs:3
94: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:73
95: tokio::runtime::enter::Enter::block_on::{{closure}}
at tokio-0.2.22/src/runtime/enter.rs:160
96: tokio::coop::with_budget::{{closure}}
at tokio-0.2.22/src/coop.rs:127
97: std::thread::local::LocalKey<T>::try_with
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:263
98: std::thread::local::LocalKey<T>::with
at .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:239
99: tokio::coop::with_budget
at tokio-0.2.22/src/coop.rs:120
100: tokio::coop::budget
at tokio-0.2.22/src/coop.rs:96
101: tokio::runtime::enter::Enter::block_on
at tokio-0.2.22/src/runtime/enter.rs:160
102: tokio::runtime::thread_pool::ThreadPool::block_on
at tokio-0.2.22/src/runtime/thread_pool/mod.rs:82
103: tokio::runtime::Runtime::block_on::{{closure}}
at tokio-0.2.22/src/runtime/mod.rs:446
104: tokio::runtime::context::enter
at tokio-0.2.22/src/runtime/context.rs:72
105: tokio::runtime::handle::Handle::enter
at tokio-0.2.22/src/runtime/handle.rs:76
106: tokio::runtime::Runtime::block_on
at tokio-0.2.22/src/runtime/mod.rs:441
107: gluon_language_server::main
at src/main.rs:1
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I am using binary compiled from 9f5e9e3.
cargo install gluon_language-server
would run into such error:
error: environment variable `GIT_COMMIT` not defined
--> gluon_language-server-0.17.0/src/command/initialize.rs:39:65
|
39 | concat!(env!("CARGO_PKG_VERSION"), "-", env!("GIT_COMMIT")).into(),
| ^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
But it compiles if I run cargo build
from the source dir.
VSCode doesnt show the plugin anymore in its search, probably since it did not get any update since 2017.
https://marketplace.visualstudio.com/items?itemName=Marwes.gluon
error[E0308]: mismatched types
--> /usr/ports/lang/gluon-language-server-lsp/work/gluon_language-server-0.18.0/cargo-crates/gluon_base-0.18.0/src/types/mod.rs:1042:24
|
1042 | const _: [(); 8 * 6] = [(); std::mem::size_of::<Type<Symbol, ArcType>>()];
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a fixed size of 48 elements, found one with 40 elements
| |
| help: consider specifying the actual array length: `40`
Version: 0.18.0
rust-1.74.1
FreeBSD 14.0
Error from Output:
[Error - 23:30:17] Starting client failed
Launching server using command gluon_language-server failed.
gluon
and gluon_language-server
are both in $PATH
, and changing the path to ~/.cargo/bin/gluon_language-server
did not fix the issue.
I'm compiling a fork of the language server myself every time I add a new type or module to gluon vm for my specific usage. It would be a great help if a way to restart the language server from the extension is added.
I'm using VSCode version 1.30.2 on Ubuntu 18.04LTS.
Your Cargo.lock
is currently fixed on an outdated and yanked clap
version, which is likely to cease working in future, see clap-rs/clap#2076 for details.
Consider running cargo update -p clap
and commit the changes to Cargo.lock
I was just raging about the lack of emacs support and @iroedius made a basic major mode for gluon with lsp support for me here https://gist.github.com/pillowtrucker/c25f086f62b12fe912b7bcc2aa3e8d59
Is this something you'd be interested in having ? I think this is the only ML/haskell-adjacent project I've ever seen that has vim and vscode nonsense but no emacs support
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.