You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected (or unnecessary) dependency (once_cell) because of target_os incorrect usage #281
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.
Activity
zakarumych commentedon Oct 21, 2025
I would say one should not use
not(target_os)for this purpose.Using dependencies FOR specific OS sounds alright.
So I propose replacing negative condition with explicit list of target_os or target_family.