Skip to content

Errors adding a dependency to a new project #9

@itowlson

Description

@itowlson

Unexpected character '/' after patch version number (fixed)

Created a new Spin project using the http-rust template then tried to add a dependency to it, but I got a cryptic error:

$ spin deps add ~/github/wasi-key-value-sample/qr-generator-cached/target/wasm32-unknown-unknown/release/qr_generator_cached.wasm
Select packages to import (use space to select, enter to confirm): example:[email protected]
Select one or all interfaces to import from package 'example:[email protected]': qr
Select a component to add the dependency to: deps-plugin-test
Error: unexpected character '/' after patch version number

A .wit directory was created with the right tree underneath it, and deps.wit looks reasonable, but nothing was added to spin.toml.

World contains different number of imports than expected

I am not sure if this is related or a different error or related, but when I then tried to add a second component, I got a different error:

$ spin deps add ~/testing/vscode-wasm-component-model-sample/calculator-impl/target/wasm32-unknown-unknown/release/calculator_impl.wasm 
Select packages to import (use space to select, enter to confirm): vscode:example
Select one or all interfaces to import from package 'vscode:example': types
Select a component to add the dependency to: deps-plugin-test
Error: failed to merge package `root:component` into existing copy

Caused by:
    0: failed to merge world `dependency-world`
    1: world contains different number of imports than expected

This second component was not added to deps.wit (or to spin.toml).

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