Skip to content

Cargo.lock is unexpectedly included in packaged library crate #9317

@nazar-pc

Description

@nazar-pc

Problem
The latest update i this topic I found was #7026, which says that Cargo.lock is included by default with executable crates.
However, my crate is not executable, yet I found that it still includes lock file for some reason.

Steps

  1. Clone https://github.com/nazar-pc/mediasoup/tree/1021dc6c13196afe8f47c81ccdfe76f19635c5d8
  2. cd rust
  3. cargo package
  4. Check generated package, it will include Cargo.lock

Possible Solution(s)
Would be nice to not include it I think, especially since root Cargo.lock is excluded in .gitignore.

Notes

Output of cargo version: cargo 1.51.0 (43b129a 2021-03-16)

UPD: Excluding Cargo.lock in Cargo.toml explicitly doesn't seem to have any effect either 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions