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

Mac OS release CI workflow fails: "can't find crate for core" #87

Open
bonsairobo opened this issue Dec 9, 2023 · 6 comments
Open

Mac OS release CI workflow fails: "can't find crate for core" #87

bonsairobo opened this issue Dec 9, 2023 · 6 comments

Comments

@bonsairobo
Copy link

I'm trying to run the release CI workflow and only Mac OS fails with this error:

error[E0463]: can't find crate for `core`
  |
  = note: the `aarch64-apple-darwin` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-apple-darwin`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

I'm puzzled because the workflow seems to be installing the aarch64-apple-darwin target here:

     - name: Install rust toolchain for Apple Silicon
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          targets: aarch64-apple-darwin
@NiklasEi
Copy link
Owner

NiklasEi commented Dec 9, 2023

That's quite strange. I don't have access to a Mac right now, but triggered CI to try to reproduce: https://github.com/NiklasEi/bevy_game_template/actions/runs/7153182125/job/19479340418

Is your project code available?

@bonsairobo
Copy link
Author

@NiklasEi
Copy link
Owner

NiklasEi commented Dec 9, 2023

The compile error is gone when you delete your rust-toolchain.toml. I guess that the target is installed for a different rust version than the one you request in the toolchain file, but I don't really understand it.

@NiklasEi
Copy link
Owner

I would consider this closed as it seemed to be a miss-configuration through the rust-toolchain.toml file.
Feel free to re-open if you see something that should be done about it in the template.

@bonsairobo
Copy link
Author

bonsairobo commented Dec 12, 2023

I guess, although it's not uncommon for projects to commit a rust-toolchain.toml. Maybe there is a way to exclude it from the CI workflow.

@NiklasEi
Copy link
Owner

I think excluding it would be surprising. The best solution would be to find and use an action that supports them. The currently used action does not and is not planning to: dtolnay/rust-toolchain#12

@NiklasEi NiklasEi reopened this Dec 12, 2023
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