Skip to content

Extract dependency WITs during build#3378

Open
itowlson wants to merge 6 commits intospinframework:mainfrom
itowlson:deps-extract-wit
Open

Extract dependency WITs during build#3378
itowlson wants to merge 6 commits intospinframework:mainfrom
itowlson:deps-extract-wit

Conversation

@itowlson
Copy link
Collaborator

@itowlson itowlson commented Jan 21, 2026

Fixes #3376.

WIP. Current status: 1. contains gross, gross hacks replaced with BEAUTIFUL AND ELEGANT hacks, and 2. incomplete.

Work needed:

  • Handle export
  • Test that include is handled correctly I think this works but a second tester would be very welcome
  • Unit tests (and e2e tests and examples)
  • Provide a way to invoke it outside of build (can be deferred if naming is hard, which it always is)

@itowlson
Copy link
Collaborator Author

I think include might be a non-issue because Spin dependencies are on interfaces or packages, not on worlds, and interfaces don't include as far as I can tell (only worlds do).

I do determine the exported interfaces by looking at worlds, but I believe it's safe to ignore include directives for this, because an interface can be exported through an include if there's a world that exports it, and because we iterate the worlds we will pick it up from there.

I am not sure if there is some edge case when a component exports interfaces from other packages but that seems like a potential issue regardless of include. Bother.

@itowlson itowlson force-pushed the deps-extract-wit branch 3 times, most recently from de01fea to 09cf63d Compare February 10, 2026 02:25
@fibonacci1729 fibonacci1729 moved this to Backlog in Spin 4.0 Feb 10, 2026
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson itowlson marked this pull request as ready for review February 11, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Emit WITs during build

1 participant