Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC of smithay-derive #1090

Closed
wants to merge 1 commit into from
Closed

Conversation

PolyMeilex
Copy link
Member

TODO:
[ ] Support all modules
[ ] Add old macro style as well, not only derive, and remove old definitions
[ ] If we add non-derive style macro, crate should probably be renamed to smithay-macros or smithay-proc
[ ] Use in anvil and smallvil

@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.32% ⚠️

Comparison is base (8d239c7) 24.20% compared to head (5dbabfa) 23.88%.
Report is 47 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1090      +/-   ##
==========================================
- Coverage   24.20%   23.88%   -0.32%     
==========================================
  Files         140      141       +1     
  Lines       22334    21695     -639     
==========================================
- Hits         5405     5182     -223     
+ Misses      16929    16513     -416     
Flag Coverage Δ
wlcs-buffer 20.92% <0.00%> (-0.39%) ⬇️
wlcs-core 20.55% <0.00%> (-0.42%) ⬇️
wlcs-output 8.41% <0.00%> (-0.13%) ⬇️
wlcs-pointer-input 22.59% <0.00%> (-0.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/wayland/compositor/mod.rs 49.74% <0.00%> (-13.08%) ⬇️
src/wayland/module_registry.rs 0.00% <0.00%> (ø)
src/wayland/output/mod.rs 52.27% <0.00%> (-9.07%) ⬇️
src/wayland/shm/mod.rs 43.15% <0.00%> (-13.01%) ⬇️

... and 49 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ids1024
Copy link
Member

ids1024 commented Jul 25, 2023

So, this should also eliminate the need to write/copy long and arcane macro_rules! delegate_* declarations? That will be nice. That is not a highlight of dealing with code in smithay and mithay-client-toolkit.

smithay-macros may be a better name if we add other kinds of proc macros to it later. But it doesn't matter that much.

@PolyMeilex
Copy link
Member Author

So, this should also eliminate the need to write/copy long and arcane macro_rules! delegate_* declarations?

Yep, the module descriptor is enough to handle both derive macros and our current style of macros if we'd want that (haven't implemented the non-derive variant yet, tho).

modules: HashMap::new(),
};

registry.regiter(super::compositor::descriptor());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regiter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants