Skip to content

Better error messages when component dependencies are not allowed to inherit configuration #2969

@mikkelhegn

Description

@mikkelhegn

Using Spin 3.1.0.

My Spin component has a dependency on a component which need access to an inference model. I did not configure dependencies_inherit_configuration = true for the Spin component, so the dependency would not get access to the model. The error message I was getting was not helping me track down the problem:

> spin up
Logging component stdio to ".spin/logs/"
Storing default key-value data to ".spin/sqlite_key_value.db".
Error: failed to resolve dependencies for component "challenge1"

Caused by:
   0: an error occurred when preparing dependencies
   1: encoding produced a component that failed validation
   2: type mismatch for import `wasi:sockets/[email protected]`
type mismatch in instance export `udp-socket`
resource types are not the same (ResourceId { globally_unique_id: 3, contextually_unique_id: 21 } vs. ResourceId { globally_unique_id: 3, contextually_unique_id: 102 }) (at offset 0x227e1ee)

The dependent component was built in Python, using componentize-py.

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