-
Notifications
You must be signed in to change notification settings - Fork 965
Explore using include! instead of macros in internals #5596
Copy link
Copy link
Open
Description
Calling macros across crate boundaries has been the source of so many bugs that I am known to write hyperbolic statements like 'death to all macros'. Instead of being so dramatic we could use include! to include a SSOT file that contains the code. Achieves the same aim which is to not have code duplication.
To close this issue please do:
- Find a simple macro from
internals - Deprecate it but do not remove it (either with the attribute if that works or just in the docs). (Do not remove so as to not break the API needlessly).
- Create a file somewhere with the macro code in it (where to put it left to the implementer but please think carefully).
- Use
include!in multiple crates to prove this all works. - Write an issue saying 'Consider removing macro
fooright before next breaking release ofinternals'
Additional notes
See primitives/src/hash_types/ for an example of include! usage.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels