Skip to content

Disable default features of tempfile crate to minimize dependencies #169

@cschwan

Description

@cschwan

Since version 3.15 the tempfile crate has the feature getrandom, which is enabled by default. Unfortunately, it pulls in 30+ dependencies, and I would like to avoid that; what I'm proposing is:

diff --git a/Cargo.toml b/Cargo.toml
index b6da1dd..83668b2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -147,7 +147,7 @@ color = ["dep:anstream", "predicates/color"]
 color-auto = ["color"]
 
 [dependencies]
-tempfile = "3.27"
+tempfile = { default-features = false, version = "3.27" }
 globwalk = "0.9"
 predicates = { version = "3.1.4", default-features = false, features = ["diff"] }
 predicates-core = "1.0.10"

and the corresponding change to Cargo.lock.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions