FuelLabs/sway · error · anyhow::Error

No {} found for {}

Error message

No {} found for {}

What it means

Error "No {} found for {}" thrown in FuelLabs/sway.

Source

Thrown at forc-pkg/src/source/reg/mod.rs:356

        .join(repo_dir_name)
}

impl source::Pin for Source {
    type Pinned = Pinned;
    fn pin(&self, ctx: source::PinCtx) -> anyhow::Result<(Self::Pinned, PathBuf)> {
        let pkg_name = ctx.name.to_string();
        let fetch_id = ctx.fetch_id();
        let source = self.clone();
        let pkg_name = pkg_name.clone();

        let cid = block_on_any_runtime(async move {
            with_tmp_fetch_index(fetch_id, &pkg_name, &source, |index_file| {
                let version = source.version.clone();
                let pkg_name = pkg_name.clone();
                async move {
                    let pkg_entry = index_file
                        .get(&version)
                        .ok_or_else(|| anyhow!("No {} found for {}", version, pkg_name))?;
                    Cid::from_str(pkg_entry.source_cid()).map_err(anyhow::Error::from)
                }
            })
            .await
        })?;

        let path = registry_package_dir(&self.namespace, ctx.name, &self.version);
        let pinned = Pinned {
            source: self.clone(),
            cid,
        };
        Ok((pinned, path))
    }
}

impl source::Fetch for Pinned {
    fn fetch(&self, ctx: source::PinCtx, path: &Path) -> anyhow::Result<PackageManifestFile> {
        // Co-ordinate access to the registry checkout directory using an advisory file lock.

View on GitHub (pinned to 47e5e902fa)

When it happens

Trigger: Thrown at forc-pkg/src/source/reg/mod.rs:356 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of FuelLabs/sway@47e5e902fa (2026-08-16). Data as JSON: /api/errors/1391c2111d718654. Report an issue: GitHub.