Skip to content

Improve macro hygiene #1633

@siku2

Description

@siku2

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)

Metadata

Metadata

Assignees

Labels

A-yew-macroArea: The yew-macro cratemacroIssues relating to our procedural or declarative macros

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions