Skip to content

Unable to build helix-lsp on latest nightly: reached the type-length limit while instantiating helix_parsec::or #11111

Closed
@RossSmyth

Description

@RossSmyth

The latest nightly (154fdac39 2024-07-07) no longer is able to compile Helix. This is still being triaged upstream but I am filing this issue to track it here and ensure Helix users are aware of it.

These are the lines that fail:

let parser = choice!(
tabstop(),
placeholder(),
choice(),
variable(),
map("$", |_| SnippetElement::Text("$".into())),
map(text(escape_chars, term_chars), SnippetElement::Text),
);

With the error:

error: reached the type-length limit while instantiating `helix_parsec::or::<'_, {closure@helix_parsec::map<'_, (&str, {closure@helix_parsec::filter_map<'_, ..., ..., ...>::{closure#0}}, ..., ..., ...), ..., ...>::{closure#0}}, ..., ...>`
   --> helix-lsp\src\snippet.rs:429:26
    |
429 |               let parser = choice!(
    |  __________________________^
430 | |                 tabstop(),
431 | |                 placeholder(),
432 | |                 choice(),
...   |
435 | |                 map(text(escape_chars, term_chars), SnippetElement::Text),
436 | |             );
    | |_____________^
    |
    = help: consider adding a `#![type_length_limit="28949205"]` attribute to your crate
    = note: the full type name has been written to 'C:\Users\rsmyth\AppData\Local\helix\target\release\deps\helix_lsp-8d2cb44db19181ec.long-type.txt'
    = note: this error originates in the macro `choice` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `helix-lsp` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `helix-term v24.3.0 (C:\Users\rsmyth\AppData\Local\helix\helix-term)`, intermediate artifacts can be found at `C:\Users\rsmyth\AppData\Local\helix\target`.

rust-lang/rust#125507

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions