Skip to content

Move generated registers into discrete modules #125

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

Merged
merged 2 commits into from
May 4, 2025

Conversation

rauhul
Copy link
Collaborator

@rauhul rauhul commented May 4, 2025

Updates the stm32 examples to put generated register interfaces into their own module. This improves build performance because the swiftmodule containing the generated registers doesn't need to be rebuilt when the primary application changes.

Ideally these registers would be generated using the SVD2SwiftPlugin instead of directly checked into the repo, however there is a huge build time cost to this because SwiftPM has separate build graphs for plugins vs the primary build. This results in 2 copies of swift-syntax getting built which inflates build time to 5+ minutes. Worse, SwiftPM randomly triggers rebuilds of swift-syntax in the plugin graph making using the plugin effectively impossible.

Updates the stm32 examples to put generated register interfaces into
their own module. This improves build performance because the
swiftmodule containing the generated registers doesn't need to be
rebuilt when the primary application changes.

Ideally these registers would be generated using the SVD2SwiftPlugin
instead of directly checked into the repo, however there is a huge build
time cost to this because SwiftPM has separate build graphs for plugins
vs the primary build. This results in 2 copies of swift-syntax getting
built which inflates build time to 5+ minutes. Worse, SwiftPM randomly
triggers rebuilds of swift-syntax in the plugin graph making using the
plugin effectively impossible.
@rauhul rauhul requested a review from kubamracek as a code owner May 4, 2025 16:45
@rauhul rauhul force-pushed the move-registers-to-module branch from df796b9 to dbdb91f Compare May 4, 2025 16:48
@rauhul rauhul merged commit 41b3061 into main May 4, 2025
21 checks passed
@rauhul rauhul deleted the move-registers-to-module branch May 4, 2025 16:53
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.

1 participant