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

Cargo crate depends #286

Closed
ghost opened this issue Oct 12, 2020 · 6 comments
Closed

Cargo crate depends #286

ghost opened this issue Oct 12, 2020 · 6 comments

Comments

@ghost
Copy link

ghost commented Oct 12, 2020

Hi, pkgsrc maintainer here.
NetBSD has an helping tool to generate raw pkg Makefiles from an URL, url2pkg.

You probably don't need to know this, but the issue is that up to commit f40b36c url2pkg was able to identify all dependency crates and generate a list of CARGO_CRATE_DEPENDS. This is not working on the v0.2.3 release.

There're 401 crate dependencies in total and it's a nightmare to go through all of them manually.

So, I wonder what changed in the last 4 commits that could have induced this behavior change?

Thanks.

@ghost
Copy link
Author

ghost commented Oct 12, 2020

Actually, commit f3c6611 works also.
While commit b9dfc09 does not, so the change was introduced in this one.

@hrkfdn
Copy link
Owner

hrkfdn commented Oct 12, 2020

Hmm, looks like the Cargo.lock format changed recently: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md

If Cargo.lock needs to be updated, then it will be automatically transitioned to the new V2 format. This format removes the [metadata] table, and should be easier to merge changes in source control systems. This format was introduced in 1.38, and made the default for new projects in 1.41. rust-lang/cargo#8554

This was made default with Rust 1.47 and default for new projects in 1.41, so this will show up with other ports as well in the future. OpenBSD has a similar task and could also be affected. The tooling needs to be updated to support the new lockfile format.

@ghost
Copy link
Author

ghost commented Oct 12, 2020

I see, so your suggestion is that I report this to NetBSD?

@hrkfdn
Copy link
Owner

hrkfdn commented Oct 12, 2020

I suppose so, in any case this is not something ncspot specific, as this file is generated by cargo. I can't really influence it.

@ghost
Copy link
Author

ghost commented Oct 12, 2020

Ok, thanks. I'll report the behavior change.
I've managed to start compiling the new release by pulling the crate list from the last working commit and manually adding the versions from the current Cargo.lock file.

Closing the issue now.

@ghost ghost closed this as completed Oct 12, 2020
@ghost
Copy link
Author

ghost commented Oct 12, 2020

@hrkfdn ncspot-0.2.3 has now been merged into pkgsrc.

This issue was closed.
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

No branches or pull requests

1 participant