Skip to content
This repository was archived by the owner on Jun 21, 2019. It is now read-only.

Generate crate directories by semantic version #38

@infinity0

Description

@infinity0

It would be good if cargo-vendor could add an option to generate directories according to semantic version. This would help make it easier to spot incompatibilites between the vendored sources of different rust packages, but still be somewhat de-duplicable.

For example, if cargo-vendor needs to pack (foo-1.3, foo-1.2, foo-0.4), with no flag it would currently generate (AIUI):

vendor/foo
vendor/foo-1.2
vendor/foo-0.4

With --explicit-version

vendor/foo-1.3
vendor/foo-1.2
vendor/foo-0.4

With --semantic-version it could generate:

vendor/foo-1
vendor/foo-1.2
vendor/foo-0.4

It's then more visually obvious that we could try dropping foo-1.2 and things "should" still work, but also the path vendor/foo-1 would remain stable if we switched to using foo-1.3 later.

In fact cargo-vendor could have another flag --drop-compatible to automatically do this, perhaps with a warning that some crates might not actually follow semantic versioning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions