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

min version requires rust 1.79 #1913

Open
gilescope opened this issue Sep 11, 2024 · 7 comments
Open

min version requires rust 1.79 #1913

gilescope opened this issue Sep 11, 2024 · 7 comments

Comments

@gilescope
Copy link

At the moment:

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

Gets the latest version which requires 1.79. We are stuck on 1.78 due to a rustc bug ( rust-lang/rust#127351 ). In general it's probably good for a project like this to not require the latest rustc as it's widely used.

@NobodyXu
Copy link
Member

I don't think we have a hard dependency on rust/cargo at runtime?

detect-targets does try using rustc to get current target, but it can fallback to other detection methods if rustc is not found.

@gilescope
Copy link
Author

I get:

 Downloaded cargo-binstall v1.7.0
               +prep *failed* | error: cannot install package `cargo-binstall 1.7.0`, it requires rustc 1.79.0 or newer, while the currently active rustc version is 1.78.0

1.6.9 is fine but above that I get that error. Not too sure what's changed.

@gilescope
Copy link
Author

Maybe there's a dependency that's had a patch that then pulls in the requirement? That would explain why it hit many versions at once. binstalk seems the only dep that changed between those versions

@NobodyXu
Copy link
Member

If you run

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

It should use pre-built binaries.

BTW latest release is 1.10.4

@TomAFrench
Copy link

We ran into this earlier today as well (failing CI run https://github.com/AztecProtocol/aztec-packages/actions/runs/10810494413/attempts/2?pr=8434) we'd get a 403 error and then the script posted above fell back to attempt compilation from source.

Things have been fine since then so this was likely something that only occurs around the time a release is published although I would expect any issue like that (binaries not having been uploaded yet, etc.) would result in a 404 rather than a 403.

@NobodyXu
Copy link
Member

I think you might hit the github API rate limit.

To fix it, you can pass GITHUB_TOKEN: ${ secrets.GITHUB_TOKEN } as env to cargo-binstall.

You can reduce the permissions of secrets.GITHUB_TOKEN using https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#permissions

@NobodyXu
Copy link
Member

I think we should add this to FAQ for anyone

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