Skip to content

Conversation

rbtcollins
Copy link
Contributor

Closes #604

Signed-off-by: Robert Collins robert.collins@cognite.com

@rbtcollins
Copy link
Contributor Author

Note that this doesn't on its own fix the cargo-audit bug with sparse+ references in lockfiles because of the non-local use of cargo-lock by cargo-audit: a release of cargo-lock and then an update to use the released version will be required to fully fix the bug.

@rbtcollins
Copy link
Contributor Author

Looking more closely at #604 it is possible that it is describing a different problem : the one this patch solves is explicitly annotated sparse registries, such as happens when a company or organisation has an internal registry for internal crates, and that internal registry happens to be sparse.

@tarcieri
Copy link
Member

tarcieri commented Jan 4, 2023

source.rs is effectively vendored from what is now https://github.com/rust-lang/cargo/blob/master/src/cargo/core/source/source_id.rs

Making any changes which diverge from upstream does not make sense to me.

@rbtcollins
Copy link
Contributor Author

rbtcollins commented Jan 5, 2023

Ok. Well I can redo the change to be aligned with cargo's own form. Is the vendoring automated, or just a copy+fix-up until it builds?

@tarcieri
Copy link
Member

tarcieri commented Jan 5, 2023

It’s manually vendored

This is a forward port from Cargo of the relevant changes.

Closes rustsec#604

Signed-off-by: Robert Collins <robert.collins@cognite.com>
@rbtcollins
Copy link
Contributor Author

I've changed the change to match the Cargo expression of the logic.

@rbtcollins
Copy link
Contributor Author

@tarcieri ping - I think this meets your needs vis-a-vis not diverging now

@tarcieri
Copy link
Member

tarcieri commented Jan 9, 2023

Since these enums aren't marked #[non_exhaustive], this is a breaking change which necessitates a major version bump (something I can take care of).

We could also bump MSRV as part of it in order to better retain compatibility with the upstream code.

@rbtcollins
Copy link
Contributor Author

I'm happy to push up a change to be 1.56 compatible, and add #[non_exhaustive] to save future compat friction; or I can push up one bumping the MSRV; let me know.

@tarcieri
Copy link
Member

tarcieri commented Jan 9, 2023

Let's go ahead and bump MSRV to stay compatible with the upstream code

@rbtcollins
Copy link
Contributor Author

MSRV bump pushed

@tarcieri
Copy link
Member

Looks like the clippy MSRV needs to be bumped

@rbtcollins
Copy link
Contributor Author

Have bumped MSRV pervasively now.

@tarcieri
Copy link
Member

Looks good now, thanks!

@tarcieri tarcieri merged commit 5af734e into rustsec:main Jan 20, 2023
@tarcieri tarcieri mentioned this pull request Apr 24, 2023
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.

cargo audit doesn't work well with sparse-registry
2 participants