Skip to content

ci(run): install codegen-cli with cargo-binstall #4394

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

Merged
merged 1 commit into from
Jun 28, 2025

Conversation

rami3l
Copy link
Member

@rami3l rami3l commented Jun 27, 2025

This pull request updates the installation process for bindgen-cli in the ci/run.bash file to use cargo-binstall, which provides a faster and more efficient installation method.

This is necessary because since https://github.com/rust-lang/rust-bindgen/releases/tag/v0.72.0, the original quick installation script is no longer present.

@rami3l
Copy link
Member Author

rami3l commented Jun 27, 2025

One very weird (although not directly related to the optimization this PR is doing) thing is that bindgen-cli is failing to build (on master) in both aarch64-unknown-linux-musl and powerpc64le-unknown-linux-musl workflows and nothing else.

Furthermore, the error message always says:

error: failed to compile `bindgen-cli v0.72.0`, intermediate artifacts can be found at `/checkout/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Caused by:
  cannot produce proc-macro for `clap_derive v4.1.0` as the target `x86_64-unknown-linux-gnu` does not support these crate types

We do know that clap_derive supports x86_64-unknown-linux-gnu. What could possibly go wrong?

PS: cargo -vV gives host: x86_64-unknown-linux-gnu and os: Ubuntu 22.4.0 [64-bit] for both workflows.

@0xPoe have you seen this error message before?
Also cc @Kobzol for the potential link with #4368...

@Kobzol
Copy link
Contributor

Kobzol commented Jun 27, 2025

Not sure where the issue is, but maybe using e.g. rust-cache could be an alternative zo cargo-binstall.

@rami3l
Copy link
Member Author

rami3l commented Jun 28, 2025

Not sure where the issue is, but maybe using e.g. rust-cache could be an alternative zo cargo-binstall.

@Kobzol Thanks for the reply! To be clear, however, the error I've mentioned above seems to be pre-existing and not directly related to this patch, as we will still need to get a recent codegen-cli installed in aarch64-unknown-linux-musl and powerpc64le-unknown-linux-musl in some way in the first place.

I'll be merging this patch first (since we need that installation anyway), and let's move the rest of the discussion to #4396.

@rami3l rami3l force-pushed the ci/alt-install-codegen-cli branch from 56319a9 to 856434e Compare June 28, 2025 05:36
@rami3l rami3l marked this pull request as ready for review June 28, 2025 05:37
@rami3l rami3l enabled auto-merge June 28, 2025 05:38
@rami3l rami3l added this pull request to the merge queue Jun 28, 2025
Merged via the queue into rust-lang:master with commit 1895033 Jun 28, 2025
29 checks passed
@rami3l rami3l deleted the ci/alt-install-codegen-cli branch June 28, 2025 06:06
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

Successfully merging this pull request may close these issues.

3 participants