Upgrade cstr crate to 0.2.x
Categories
(Core :: General, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: xidorn, Assigned: xidorn)
References
Details
Attachments
(1 file)
cstr 0.2 switches away from the procedural macro hack, and uses the proper function-like procedural macro. It requires Rust 1.45 and above. With 0.2.2 and Rust 1.46, cstr macro would also be usable to initialize const
as well.
Comment 1•4 years ago
|
||
Not likely to see this until FX83?
Comment 2•4 years ago
|
||
Any better using 0.2.5?
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Somehow can't make it work on try... This is my latest attempt: https://treeherder.mozilla.org/jobs?repo=try&revision=b6cb30b2e0c3832adc92d274c36851f8171d5314
The two Android WR fails have:
[task 2020-12-05T23:15:41.926Z] error[E0432]: unresolved import `proc_macro`
[task 2020-12-05T23:15:41.927Z] --> /builds/worker/checkouts/gecko/gfx/wr/vendor/cstr/src/lib.rs:23:5
[task 2020-12-05T23:15:41.927Z] |
[task 2020-12-05T23:15:41.927Z] 23 | use proc_macro::TokenStream as RawTokenStream;
[task 2020-12-05T23:15:41.927Z] | ^^^^^^^^^^ help: a similar path exists: `quote::proc_macro`
[task 2020-12-05T23:15:41.927Z]
[task 2020-12-05T23:15:41.967Z] error: aborting due to previous error
which looks like an error from old days when extern crate proc_macro
was still required, like before 1.42.0 was released. On that version cstr 0.2.x definitely can't be compiled.
But I checked the rustc toolchain downloaded in that log, and it seems to be using the exactly same 1.48.0 I'm using locally, and I can't reproduce its result...
It would be appreciated if anyone can shed some light on this.
Assignee | ||
Comment 5•4 years ago
|
||
OK, I know the reason. I think this is because of cargo-apk
used in the build somehow invokes rustc
directly without passing --extern proc_macro
like what cargo
normally does. I think that means adding extern crate proc_macro;
would fix it.
Assignee | ||
Comment 6•4 years ago
|
||
And it seems to me the latest version of cargo-apk
doesn't have this problem, so maybe we should upgrade it.
Comment 8•4 years ago
|
||
bugherder |
Description
•