Skip to content

Default path for a versioned Wasm dependency omits patch version #137

@itowlson

Description

@itowlson

Consider this WAC file:

package root:component-val@0.0.1 targets fermyon:spin/http-trigger@2.0.0;

let c = new root:component@0.0.1 { ... };

export c...;

Per #136, it's not currently possible to give a path to the root:component@0.0.1 Wasm file on the CLI. However, it is possible to omit it from the CLI and instead supply it via the deps folder. The file name wac looks for in this case is ./deps/root/component/0.0.wasm.

Note that this does not include the patch version! This is because of this line:

path.set_extension("wasm");

The preceding lines derive a path of deps/root/component/0.0.1, but set_extension replaces the .1 with .wasm.

This seems unintentional, although perhaps I am misunderstanding the intended layout of the deps directory. I did try having a directory called 0.0.1 (which would bypass the set_extension call) with the Wasm file in it, but that just produced a "no package header was found in any WIT file for this package" error.

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