emk / heroku-buildpack-rust

A buildpack for Rust applications on Heroku, with full support for Rustup, cargo and build caching.
522 stars 186 forks source link

error: reached the type-length limit #51

Closed ArtHome12 closed 4 years ago

ArtHome12 commented 4 years ago

What happened this morning? Locally everything is fine, but on deployment (my app is vzmuinebot has no significant changes from yesterday):

-----> Rust app detected
-----> Checking for new releases of Rust stable channel
info: checking for self-updates
  rustup unchanged - 1.22.1
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2020-08-27, rust version 1.46.0 (04488afe3 2020-08-24)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'cargo'
info: Defaulting to 500.0 MiB unpack ram
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
  stable-x86_64-unknown-linux-gnu updated - rustc 1.46.0 (04488afe3 2020-08-24) (from rustc 1.45.2 (d3fb005a3 2020-07-31))
info: checking for self-updates
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.46.0 (04488afe3 2020-08-24)
-----> Building application using Cargo
    Updating crates.io index
   Compiling libc v0.2.76
   Compiling cfg-if v0.1.10
   Compiling proc-macro2 v1.0.19
[skip]
   Compiling reqwest v0.10.8
   Compiling teloxide v0.2.0
   Compiling vzmuinebot v0.5.2 (/tmp/build_561df862)
error: reached the type-length limit while instantiating `std::future::from_generator::<[s...g::Dispatcher]>, ()}]>}]>, ()}]>`
   |
   = note: consider adding a `#![type_length_limit="3987824"]` attribute to your crate
error: aborting due to previous error
error: could not compile `vzmuinebot`.
To learn more, run the command again with --verbose.
 !     Push rejected, failed to compile Rust app.
 !     Push failed
ArtHome12 commented 4 years ago

Adding RustConfig file with VERSION="1.45.2" prevents the problem, but locally builds and with version 1.46.0 successfully...

emk commented 4 years ago

This looks like it's probably a rustc issue, possibly fixed in the newest release if I understand what you're saying correctly.

ArtHome12 commented 4 years ago

Yes, you are right, now it is already clear that this is a rustcproblem

emk commented 4 years ago

Great! Glad you figured it out.