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

Strip source generator attributes using [Conditional] #38

Closed
Sergio0694 opened this issue Nov 15, 2021 · 0 comments · Fixed by #77
Closed

Strip source generator attributes using [Conditional] #38

Sergio0694 opened this issue Nov 15, 2021 · 0 comments · Fixed by #77
Assignees
Labels
improvements ✨ Improvements to an existing functionality introduce breaking changes 💥 This change would be a breaking change mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit
Projects

Comments

@Sergio0694
Copy link
Member

Currently, all attributes used for the source generator feature are preserved in the compiled binaries, which just results in unnecessary binary size given these attributes are only ever used to guide the source generators at build time. We can strip them from the final assemblies by leveraging the [Conditional] attribute and using a dummy constant that final users will not have. Additionally, we might also set a custom one that we can then document, to still offer advanced users the ability to opt-in into preserving them, if needed.

@Sergio0694 Sergio0694 added improvements ✨ Improvements to an existing functionality introduce breaking changes 💥 This change would be a breaking change mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit labels Nov 15, 2021
@Sergio0694 Sergio0694 self-assigned this Nov 15, 2021
@Sergio0694 Sergio0694 added this to To do in 8.0 via automation Nov 15, 2021
@Sergio0694 Sergio0694 moved this from To do to In progress in 8.0 Dec 31, 2021
8.0 automation moved this from In progress to Done Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvements ✨ Improvements to an existing functionality introduce breaking changes 💥 This change would be a breaking change mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit
Projects
No open projects
8.0
Done
Development

Successfully merging a pull request may close this issue.

1 participant