bytecodealliance / bytecodealliance/cargo-component

Confusion around component dependencies and target dependencies

Open
#238 4 comments 5 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
593
Forks
68
PR merge metrics
No merged PRs in 30d

Description

For a second time, I've found myself in a debugging session ultimately due to me confusing component dependencies and target dependencies. I was confused why a local wit package would not fully resolve a dependency when I listed that dependency under `package.metadata.component.dependencies` only to realize I needed to put it under `package.metadata.component.target.dependencies`. It would be wonderful if the error messages were more descriptive when failing to resolve dependencies about where such configuration needs to live.

I'm happy to start making error messages more verbose, but I'd love to get your feedback on what the right level of detail is here.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the local wit package dependency configuration described in the issue, comparing package.metadata.component.dependencies with package.metadata.component.target.dependencies. Trace the dependency-resolution error path in cargo-component and identify the existing tests around unresolved dependencies, if present. Done means the error explains which configuration location is expected for the dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.