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 is failing, need help to figure this out #28

Closed
king-numsgil opened this issue Oct 22, 2017 · 6 comments
Closed

Build is failing, need help to figure this out #28

king-numsgil opened this issue Oct 22, 2017 · 6 comments

Comments

@king-numsgil
Copy link

Build log on Heroku is :

-----> Rust app detected
-----> Downloading rustup
-----> Using rustup to install Rust channel beta
info: downloading installer
error: invalid toolchain name: 'beta
 !     Push rejected, failed to compile Rust app.
 !     Push failed

So, why is it 'beta instead of beta?

RustConfig :
VERSION="beta"

If you need more info, I can give it! Thanks for the help!

@emk
Copy link
Owner

emk commented Oct 22, 2017

Ouch, I'm sorry to see that. Did this work correctly before? Is it a new project? Have you changed anything recently? Have you forked the buildpack?

I've tried running the relevant portion of the script manually, and everything seems to be working fine, which only makes this more mysterious. :-(

This looks almost like a rustup issue, because the -----> Using rustup to install Rust channel beta line is correct.

One possible solution is to change the following in bin/compile:

set -eu

to:

set -euo xtrace

...and use the more detailed output to see what the script is doing step-by-step.

@king-numsgil
Copy link
Author

Forked, modified the line, re-deployed and here is the new log :

+ '[' -z x ']'
+ '[' 0 -ne 1 ']'
+ '[' '!' -z ']'
+ '[' '!' -f /tmp/build_72ed0fb49953b7996b0ca56bae29055f/king-numsgil-numsgil-co-f1b69b7922efdb29d5cc312f26e73568e9c9fcd7//Cargo.toml ']'
+ '[' '!' -z ']'
+ cat
+ . /app/tmp/buildpacks/a242fc781c97920123b6a3a24c43752a5603c0420ace2c6ea6b043a6488281bc124f2c9b7a7e31d253287b154b3fe4efed062216eb9a87936e761f265b7fd956/export
++ export RUSTUP_HOME=/app/tmp/cache/multirust
++ RUSTUP_HOME=/app/tmp/cache/multirust
++ export CARGO_HOME=/app/tmp/cache/cargo
++ CARGO_HOME=/app/tmp/cache/cargo
++ PATH=/app/tmp/cache/cargo/bin:/usr/local/bin:/usr/bin:/bin:/tmp/codon/vendor/bin
+ mkdir -p /app/tmp/cache
+ cd /app/tmp/cache
+ '[' -d /app/tmp/cache/cargo ']'
+ echo '-----> Downloading rustup'
-----> Downloading rustup
+ curl https://sh.rustup.rs -sSf
+ chmod u+x rustup.sh
+ echo '-----> Using rustup to install Rust channel beta
-----> Using rustup to install Rust channel beta
+ ./rustup.sh -y --default-toolchain $'beta\r'
info: downloading installer
error: invalid toolchain name: 'beta
 !     Push rejected, failed to compile Rust app.
 !     Push failed

It was working last week, I was not using a fork (now I am, obviously), I shut down my app and made a new one using the same sources and the problem's still there.

Kinda lost here... Thanks for your time!

P.S. : I'm very new to this Heroku thingy. Learning the platform as well as Rust. The possibility of a stupid mistake is far from zero!

@emk
Copy link
Owner

emk commented Oct 22, 2017

Make sure your RustConfig uses Unix line endings. It looks you you're using Windows line endings in a Unix shell script, which will fail in strange and terrible ways. Not an obvious one to diagnose!

@emk
Copy link
Owner

emk commented Oct 22, 2017

If that doesn't fix it, it might have snuck in upstream with a pull request. :-( Let me know if that fixes it.

@king-numsgil
Copy link
Author

That was it! Thanks a lot!

@emk
Copy link
Owner

emk commented Oct 23, 2017

Glad to hear it's working!

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

2 participants