olson-sean-k / wax

Opinionated and portable globs that can be matched against paths and directory trees.
https://glob.guide
MIT License
115 stars 10 forks source link

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

Closed boozook closed 3 months ago

boozook commented 4 months ago

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: https://github.com/rust-lang/rust/issues/127346

andrewdavidmackenzie commented 4 months ago

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

ThatSealgair commented 4 months ago

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 commented 3 months ago

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