didkit icon indicating copy to clipboard operation
didkit copied to clipboard

Failed to `cargo build`

Open laysakura opened this issue 7 months ago • 0 comments

How to Reproduce

As the README.md and the sprucekit.dev state:

git clone https://github.com/spruceid/ssi --recurse-submodules
git clone https://github.com/spruceid/didkit
cd didkit/
cargo build

Then the following error is observed:

% cargo build
warning: `/path/to/didkit/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
error: failed to load manifest for workspace member `/path/to/didkit/cli`
referenced by workspace at `/path/to/didkit/Cargo.toml`

Caused by:
  failed to load manifest for dependency `didkit`

Caused by:
  failed to load manifest for dependency `did-onion`

Caused by:
  failed to read `/path/to/ssi/did-onion/Cargo.toml`

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

It also happens in CI: https://github.com/spruceid/didkit/actions/runs/9910445028/job/27380838050

What I've investigated so far

While https://github.com/spruceid/ssi/pull/508 changed the whole structure of the ssi repository, the path dependencies in the didkit/lib/Cargo.toml have not been changed.

Most of the dependencies are moved to ssi/crates/dids/methods/ but I could not find the crate sources of did-webkey and did-onion, which are mentioned as deprecate in the description in https://github.com/spruceid/ssi/pull/508.

What to do?

  1. Stop using path dependency? I recommend this way to make the build easier, although it might lead to bad development experiences for core developers.
  • Created https://github.com/spruceid/didkit/pull/390 to implment this plan
  1. Remove did-webkey, did-onion (, and did-sol, which is commented-out) from didkit/lib/Cargo.toml, and then update paths in didkit/lib/Cargo.toml.
  2. Add did-webkey and did-onion crates to ssi/crates/dids/methods/, and update paths in didkit/lib/Cargo.toml.

laysakura avatar Jul 17 '24 20:07 laysakura