spruceid / didkit

A cross-platform toolkit for decentralized identity.
https://www.spruceid.dev/didkit/didkit
Apache License 2.0
274 stars 76 forks source link

Failed to `cargo build` #389

Closed laysakura closed 2 months ago

laysakura commented 4 months ago

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.
  2. 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.
  3. Add did-webkey and did-onion crates to ssi/crates/dids/methods/, and update paths in didkit/lib/Cargo.toml.
sbihel commented 2 months ago

Thank you. We've dropped support for a few DID methods, that's why they're not part of ssi anymore.