Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: reached the type-length limit while instantiating... #60

Closed
boozook opened this issue Jul 9, 2024 · 3 comments
Closed

Comments

@boozook
Copy link

boozook commented Jul 9, 2024

rustc version:

rustc 1.81.0-nightly (35b658fb1 2024-07-08)
host: aarch64-apple-darwin

Reproducible with rustc versions starting from 2024-07-08

Build without errors on nightly-2024-06-30.

error:

error: reached the type-length limit while instantiating `terminated::<Stateful<Located<'_, str>, ParserState>, Vec<...>, ..., ..., ..., ...>`
   --> /Users/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wax-0.6.0/src/token/parse.rs:495:13
    |
495 | /             sequence::terminated(
496 | |                 multi::many1(branch::alt((
497 | |                     annotate(error::context(
498 | |                         "literal",
...   |
522 | |                 terminator.clone(),
523 | |             )
    | |_____________^
    |
    = help: consider adding a `#![type_length_limit="18603125"]` attribute to your crate
    = note: the full type name has been written to '/var/folders/8l/f672k0yx3qs0cs8jkd6qsr_40000gn/T/cargo-installemo94s/release/deps/wax-75a6889293a1bfa6.long-type.txt'

error: could not compile `wax` (lib) due to 2 previous errors

There is mentioned two errors. Second is the same as above 👆

rustc issue: rust-lang/rust#127346

@boozook boozook changed the title Build error: reached the type-length limit while instantiating parser Build error: reached the type-length limit while instantiating... Jul 9, 2024
@andrewdavidmackenzie
Copy link

ditto. GH Action failed run can be found here https://github.com/andrewdavidmackenzie/flow/actions/runs/9861266085/job/27229330715

@ThatSealgair
Copy link

rustc 1.81.0-nightly (0c81f94b9 2024-07-10)
host: Ubuntu 22.04.4 LTS on Windows 10 x86_64

Getting the same output when trying to install NuShell. Example output for $ cargo install nu

error: reached the type-length limit while instantiating `terminated::<Stateful<Located<'_, str>, ParserState>, Vec<...>, ..., ..., ..., ...>`
   --> /home/sealgair/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wax-0.6.0/src/token/parse.rs:495:13
    |
495 | /             sequence::terminated(
496 | |                 multi::many1(branch::alt((
497 | |                     annotate(error::context(
498 | |                         "literal",
...   |
522 | |                 terminator.clone(),
523 | |             )
    | |_____________^
    |
    = help: consider adding a `#![type_length_limit="19570820"]` attribute to your crate
    = note: the full type name has been written to '/tmp/cargo-installYCggRA/release/deps/wax-9fdc79916d478010.long-type.txt'

error: reached the type-length limit while instantiating `terminated::<Stateful<Located<'_, str>, ParserState>, Vec<...>, ..., ..., ..., ...>`
   --> /home/sealgair/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wax-0.6.0/src/token/parse.rs:495:13
    |
495 | /             sequence::terminated(
496 | |                 multi::many1(branch::alt((
497 | |                     annotate(error::context(
498 | |                         "literal",
...   |
522 | |                 terminator.clone(),
523 | |             )
    | |_____________^
    |
    = help: consider adding a `#![type_length_limit="18603125"]` attribute to your crate
    = note: the full type name has been written to '/tmp/cargo-installYCggRA/release/deps/wax-9fdc79916d478010.long-type.txt'

   Compiling human-date-parser v0.1.2
error: could not compile `wax` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `nu v0.95.0`, intermediate artifacts can be found at `/tmp/cargo-installYCggRA`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

@boozook
Copy link
Author

boozook commented Jul 16, 2024

Fixed in the rustc 1.81.0-nightly (d9284afea 2024-07-14).

@boozook boozook closed this as completed Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants