Skip to content

Add clippy cross-checking support to CI #3325

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

Closed
wants to merge 1 commit into from

Conversation

RossSmyth
Copy link
Contributor

I can't run this on my computer because jemallocator isn't supported on Windows. So let's see if CI is happy with this.

@RossSmyth
Copy link
Contributor Author

RossSmyth commented Feb 25, 2024

My guess is missing some package

2024-02-25T19:44:42.6885970Z   configure: error: in `/home/runner/work/miri/miri/target/x86_64-apple-darwin/debug/build/jemalloc-sys-d7684c6ecce9a528/out/build':
2024-02-25T19:44:42.6887631Z   configure: error: C compiler cannot create executables
2024-02-25T19:44:42.6888730Z   See `config.log' for more details

@RossSmyth RossSmyth force-pushed the cross-clippy branch 2 times, most recently from 845fef9 to 9b6b336 Compare February 25, 2024 20:15
@RalfJung
Copy link
Member

RalfJung commented Feb 26, 2024

Doesn't seem like it's possible to run clippy for targets that one can't build binaries for. Or at least, jemalloc-sys tries to do stuff in check-builds that doesn't work for cross-builds.

So we'll have to run these on their respective native hosts, I guess?

@RalfJung
Copy link
Member

RalfJung commented Feb 26, 2024

Or alternatively we could try to make jemalloc-sys an optional dependency (on by default, but turned off for clippy) and hope that this is the only dependency that causes such issues.

That seems nicer, if it works. But there might be other dependencies with similar problems.

@saethlin
Copy link
Member

@RossSmyth We only have the jemalloc dependency to fix this issue: #3255 which we shouldn't be subject to in a check build.

So I'd support a way to toggle it off for cross-checking.

@RalfJung
Copy link
Member

RalfJung commented Mar 2, 2024

That still doesn't seem to be working

error[E0463]: can't find crate for `either`
  --> src/lib.rs:52:1
   |
52 | extern crate either; // the one from rustc
   | ^^^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `rustc_apfloat`
  --> src/lib.rs:54:1
   |
54 | extern crate rustc_apfloat;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
   |
   = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview`

@RalfJung
Copy link
Member

RalfJung commented Mar 2, 2024

I think we have to give up on the cross-clippy thing. We can just add a clippy run to the end of the regular CI job to ensure we have coverage.

@RalfJung RalfJung added the S-waiting-on-author Status: Waiting for the PR author to address review comments label Mar 2, 2024
@RossSmyth
Copy link
Contributor Author

RossSmyth commented Mar 3, 2024

Yeah I've pretty much given up on it. Too many weird things to account for. I'll keep the branch up for reference.
@rustbot blocked

@RossSmyth RossSmyth closed this Mar 3, 2024
@rustbot rustbot added S-blocked Status: blocked on something happening somewhere else and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: blocked on something happening somewhere else
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants