Skip to content
This repository was archived by the owner on Mar 7, 2023. It is now read-only.

Cargo check fails in github CI #15

Closed
atanmarko opened this issue Mar 28, 2021 · 5 comments
Closed

Cargo check fails in github CI #15

atanmarko opened this issue Mar 28, 2021 · 5 comments

Comments

@atanmarko
Copy link
Contributor

By enabling cargo-check.enable = true in default.nix, following error happens:

cargo-check..............................................................Failed

- hook id: cargo-check
- exit code: 101

    Updating crates.io index
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name; class=Net (12)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name; class=Net (12)
error: failed to get `base-x` as a dependency of package `hashexpr v0.1.0 (/build/src/hashexpr)`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`
@johnchandlerburnham
Copy link
Member

Is this an issue specific to the base-x dependency, or something more subtle regarding Nix (question for @Anderssorby)?

If the former, it might be worth looking into alternatives to https://github.com/OrKoN/base-x-rs

@Anderssorby
Copy link
Contributor

I'll take a look at it.

@Anderssorby
Copy link
Contributor

Opened an issue: cachix/git-hooks.nix#94

@Anderssorby
Copy link
Contributor

So to clarify this is an issue with nix disallowing internet access which cargo check uses. To avoid this the cargo cache needs to be loaded beforehand like in naersk. So a fix would be to add cargo check support to naersk nix-community/naersk#163

@brightly-salty
Copy link
Contributor

I think this should be closed, as GitHub CI checks passsed for #19 and #20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants