Unable to activate feature "v7"
giomf opened this issue · comments
Hi,
I can't manage to use the now_v7()
function because the compiler gives me the following error message:
no function or associated item named `now_v7` found for struct `uuid::Uuid` in the current scope
function or associated item not found in `uuid::Uuid`
Yes! I have the v7
feature flag enabled:
uuid = {version = "1.4.0", features = ["std", "v7"] }
When activating v3
for example Im able to use the new_v3()
function.
What am I missing here?
Hey,
Same here; my project was building just fine 3/4 days ago but today I end up with the same error as you, without any modification of the codebase.
NB: I use uuid 1.4.0, built with Rust 1.70.0 on Debian
Since the v6
, v7
, and v8
features are unstable, you also need to set a RUSTFLAGS environment variable at build-time in order to use them. We've got some docs on that here.
my project was building just fine 3/4 days ago
That makes me think you probably already have that flag set though, so I'll look into it. Maybe something changed upstream in Rust; we haven't made any releases in the last few days.
I just gave this a test with our example for a v7 sortable UUID using Rust 1.70.0 and 1.71.0 using the RUSTFLAGS cfg and it worked.
Hey,
I have the appropriate rustflags set in a cargo/config.toml file.
I will try again tonight; the fault is likely on my end anyway.
EDIT:
Well, the error was on my end; my cargo/config.toml
is not detected for some reason but using the inlined environment variable RUSTFLAGS="--cfg uuid_unstable" cargo build
worked like a charm.
EDIT2:
It appears that my cargo/config.toml
should be named .cargo/config.toml
; I don't know how I made it work few days ago ^^
Sorry for the inconvenience...
Have a nice day :)
Glad you got it sorted! For what it’s worth, I can’t wait to get rid of those cfgs once the RFC is stable.
How did I manage to miss that?
Thanks, now everything works as expected.