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

Prepare didkit crate for publishing to crates.io #139

Merged
merged 1 commit into from
Apr 12, 2021
Merged

Conversation

clehner
Copy link
Contributor

@clehner clehner commented Apr 8, 2021

Progress for #119

  • Add package metadata.
  • Include only the Rust source files in the crate, not all the other things in /lib.
  • Depend on ssi crates using their crates.io registry versions.

Publish dry-run succeeds with this command:

$ cargo publish --dry-run --manifest-path lib/Cargo.toml

@clehner clehner mentioned this pull request Apr 8, 2021
12 tasks
@clehner clehner marked this pull request as ready for review April 8, 2021 19:30
did-sol = { path = "../../ssi/did-sol" }
did-web = { path = "../../ssi/did-web" }
did-onion = { path = "../../ssi/did-onion" }
ssi = { version = "0.2", path = "../../ssi", default-features = false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we want to use the ssi package on crates.io?

Copy link
Member

@w4ll3 w4ll3 Apr 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if it can be done, but wouldn't it be nice if we first check if it exists on this path and as fallback go to crates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes didkit use the ssi package on crates.io when didkit is stilled from crates.io. When it is used locally, it will still require ssi to be cloned alongside the didkit repo. I don't think we can make the use of the local path conditional on the path existing (although I thought that was how it works, testing now shows it is not the case).

We could decouple didkit from ssi even for local git use, by removing the path = parts here. This could make it easier for people developing didkit, to not need ssi. But this could make it a little harder to develop didkit and ssi at the same time (having to edit Cargo.toml to add back the path = parts). I don't this question is blocking these changes, since these changes are incremental and do not break the existing usage.

Reference: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-locations

The git or path dependency will be used locally (in which case the version is checked against the local copy), and when published to a registry like crates.io, it will use the registry version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened issue for this: #141

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay keeping this for now, thanks for making the issue!

- Add package metadata
- Include only the Rust source files
- Depend on ssi crates on registry
@clehner clehner merged commit 1e67958 into main Apr 12, 2021
@clehner clehner deleted the feat/didkit-crate branch April 12, 2021 22:37
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

Successfully merging this pull request may close these issues.

3 participants