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
I keep running into places where Yew's macros aren't as hygienic as they could be. Especially now that the MSRV is 1.45.0 (which brings a few more macro features like mixed_site) it's time to do a full sweep and solve all the remaining issues:
Ensure all trait methods are invoked unambiguously
Use fully qualified paths everywhere (including primitives from ::std::primitive)
Use a configurable yew crate parameter
Use Span::mixed_site() for macro variables so they aren't available in user code
Test with #![no_implicit_prelude]
html_macro
properties derive
props macro
classes macro
function component derive
Add #[doc(hidden)] to all structs (especially in derive_props)
The text was updated successfully, but these errors were encountered:
siku2
added
the
macro
Issues relating to our procedural or declarative macros
label
Oct 28, 2020
Use Span::mixed_site() for macro variables so they aren't available in user code
When I've tried to tackle this I find that either I have to lose out on a useful span for error messages - or jump through some hoops to still use a variable from one quote block to another. Not sure if I'm missing something here :) thought I'd mention why I have seemingly stopped chipping away at this issue 😅
I keep running into places where Yew's macros aren't as hygienic as they could be. Especially now that the MSRV is 1.45.0 (which brings a few more macro features like
mixed_site
) it's time to do a full sweep and solve all the remaining issues:::std::primitive
)Use a configurableyew
crate parameterSpan::mixed_site()
for macro variables so they aren't available in user code#![no_implicit_prelude]
#[doc(hidden)]
to all structs (especially inderive_props
)The text was updated successfully, but these errors were encountered: