Skip to content

Unexpected (or unnecessary) dependency (once_cell) because of target_os incorrect usage #281

@boozook

Description

@boozook

aHash/Cargo.toml

Lines 89 to 90 in 4b73276

[target.'cfg(not(all(target_arch = "arm", target_os = "none")))'.dependencies]
once_cell = { version = "1.18.0", default-features = false, features = ["alloc"] }

FYI target_os can be any random name, including name of some custom or rare OS.
And there is should no automated decision "to take once_cell with alloc or not to take" depending on target_os (or specifically on target_os=none) - this is the error.
I'm sure this should be a feature, but definitely not a relation to target_os or target_env.

As a hot-fix I could propose to use target-family (src-doc) instead, because it's more generic and can be array-of-values defined in the target.

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