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

NOT READY FOR REVIEW : feat: add cargo pkgid support for cargo-script #14961

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rustin170506
Copy link
Member

What does this PR try to resolve?

In this PR, we added the cargo pkgid support for the cargo-script.

For the package itself:

cargo pkgid --manifest-path foo.rs
path+file:///my-project/foo.rs#0.86.0

For its dependence:

cargo pkgid --manifest-path foo.rs -p sqlx
registry+https://github.com/rust-lang/crates.io-index#sqlx@0.7.4

How should we test and review this PR?

I have updated the unit tests and also added more test cases for it.

Additional information

None

@rustbot
Copy link
Collaborator

rustbot commented Dec 19, 2024

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. Command-pkgid S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 19, 2024
@epage
Copy link
Contributor

epage commented Dec 19, 2024

Another test we'll need is that we error when a cargo script is specified as a dependency which might become possible with this change.

…ommand

Signed-off-by: Rustin170506 <techregister@pm.me>
Signed-off-by: Rustin170506 <techregister@pm.me>
Signed-off-by: Rustin170506 <techregister@pm.me>
@Rustin170506
Copy link
Member Author

Rustin170506 commented Dec 19, 2024

Another test we'll need is that we error when a cargo script is specified as a dependency which might become possible with this change.

Do you mean by cargo pkgid --manifest-path foo.rs -p foo?

@epage
Copy link
Contributor

epage commented Dec 19, 2024

I mean

[package]
name = "foo"

[dependencies]
bar.path = "bar.rs"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. Command-pkgid S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants