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

How to handle non-registry dependencies? #22

Closed
epage opened this issue Nov 16, 2023 · 7 comments
Closed

How to handle non-registry dependencies? #22

epage opened this issue Nov 16, 2023 · 7 comments

Comments

@epage
Copy link
Collaborator

epage commented Nov 16, 2023

Currently we show all dependencies as name@req. That is less meaningful for path and git dependencies. How should we handle these?

@epage epage changed the title How to handle non-registry dependencies How to handle non-registry dependencies? Nov 16, 2023
@epage epage mentioned this issue Jan 3, 2024
8 tasks
@hi-rustin
Copy link
Owner

How about we print the source ID there? For example:

cargo-information
A cargo subcommand to show information about crates.
version: 0.4.1 (from ./)
license: MIT
rust-version: 1.73
repository: https://github.com/hi-rustin/cargo-information
features:
  default          = []
  vendored-openssl = [cargo/vendored-openssl]
dependencies:
  anstyle@1.0.4
  anyhow@1.0.79
  cargo@0.76.0
  cargo-credential@0.4.1
  cargo-util@0.2.8
  clap@* (https://github.com/clap-rs/clap)
  color-print@0.3.5
  crates-io@0.39.1
  pathdiff@0.2.1
  semver@1.0.21

We print the git repo link here.

@hi-rustin
Copy link
Owner

Another example:

cargo
Cargo, a package manager for Rust.
version: 0.78.0 (from ./)
license: MIT OR Apache-2.0
rust-version: 1.75.0
documentation: https://docs.rs/cargo
homepage: https://doc.rust-lang.org/cargo/index.html
repository: https://github.com/rust-lang/cargo
features:
  all-static       = [vendored-openssl, curl/static-curl, curl/force-system-lib-on-osx, vendored-libgit2]
  vendored-openssl = [openssl/vendored]
  vendored-libgit2 = [libgit2-sys/vendored]
  openssl          = [dep:openssl]
dependencies:
  annotate-snippets@0.10.1
  anstream@0.6.5
  anstyle@1.0.4
  anyhow@1.0.79
  base64@0.21.5
  bytesize@1.3
  cargo-credential@0.4.2 (/Volumes/t7/code/cargo/credential/cargo-credential)
  cargo-platform@0.1.4 (/Volumes/t7/code/cargo/crates/cargo-platform)
  cargo-util@0.2.6 (/Volumes/t7/code/cargo/crates/cargo-util)
  cargo-util-schemas@0.2.0 (/Volumes/t7/code/cargo/crates/cargo-util-schemas)
  clap@4.4.12
  color-print@0.3.5
  crates-io@0.40.0 (/Volumes/t7/code/cargo/crates/crates-io)

@hi-rustin
Copy link
Owner

I should use the pretty_source here to print a better local path.

@epage
Copy link
Collaborator Author

epage commented Jan 17, 2024

If its not terrible to do, I think we should prefer relative paths, rather than absolute paths.

I also wonder if we should reserve showing all dependencies for a --verbose. Maybe we only show public dependencies by default? Its still an unstable feature but something for us to keep in mind as we work to stabilize both of these.

@hi-rustin
Copy link
Owner

I also wonder if we should reserve showing all dependencies for a --verbose. Maybe we only show public dependencies by default?

How about we show all the dependencies and only show the dev-dependencies and build-dependencies for a --verbose. I guess checking its dependencies before you use it in your project would always be considered.

@epage
Copy link
Collaborator Author

epage commented Jan 19, 2024

Moved this to #23 since handling of non-registry dependencies is independent of this

@hi-rustin
Copy link
Owner

closed by #100

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

No branches or pull requests

2 participants