Skip to content

Building with local dependencies #388

Closed
@Piripant

Description

@Piripant

It seems that when building with a local dependency cross fails to load the source for that local dependency. If this is my Cargo.toml:

[dependencies]
nasatopo = { path = "../nasatopo" }

The output of cross build is:

error: failed to load source for a dependency on `nasatopo`

Caused by:
  Unable to update /nasatopo

Caused by:
  failed to read `/nasatopo/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

Which is technically correct as the is not /nasatopo, but it the Cargo.toml I specified a local path, not a global one, as cross seems to understand.
Furthermore if I try to replace the relative path with a global one, the same error still happens, this time pointing to a path which is actually valid and takes to the location of the nasatopo source folder.

I think this has to do with how a docker container interfaces with the file-system, but I am not familiar and cannot tell.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions