Skip to content

wit-smith doesn't generate multiple packages #2190

Closed
@jsturtevant

Description

@jsturtevant

I was experimenting with add some more support to wit-smith and noticed it doesn't generate multiple packages due to

while self.packages.list.len() < self.config.max_packages && self.packages.list.is_empty() {

when removing that restriction it generates a valid wit file about ~50% of the time with errors like:

[2025-05-13T16:20:41Z DEBUG] validating world item: xx

thread 'main' panicked at crates/wit-parser/src/resolve.rs:1609:25:
assertion `left == right` failed
  left: "[async]xx"
 right: "xx"

and

[2025-05-13T21:43:19Z DEBUG] validating world item: name

thread 'main' panicked at crates/wit-parser/src/resolve.rs:1616:25:
assertion `left == right` failed
  left: World(Id { idx: 16 })
 right: World(Id { idx: 17 })

Is it expected that this shouldn't work? It looks like these errors are due to names being generated across packages which is causing conflicts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions