Skip to content

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
  • Unit tests
  • Provide a way to invoke it outside of build

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
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.

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
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.

Emit WITs during build

1 participant