Skip to content

Unknown escaped wit keywords are not preserved #181

@scothis

Description

@scothis

map is being considered as a new wit type and reserved word. The latest wit-bindgen implemented the proposal and now fails to generate bindings if a reserved word is encountered in an invalid context. While this is a breaking change for the ecosystem it's understandable. However, I'm unable to use wkg to fetch this wit interface as the escaped keyword is replaced with the unescaped value in the emitted wit. This in turn causes the component to fail to build.

To ensure forwards compatibility, wkg should preserve all escaped wit identifiers with their escaped value.

Source wit:

https://github.com/componentized/valkey/blob/da24efeb1e4134971890c66b52748c316f9bc3e8/wit/resp.wit#L16

Problematic wkg fetch'd wit:

https://github.com/componentized/valkey/blob/da24efeb1e4134971890c66b52748c316f9bc3e8/components/wit/deps/componentized-valkey/package.wit#L22

In this case, the wit is not published, but defined as a local override within the same repository.

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