FuelLabs/sway · error · anyhow::Error
`forc migrate` does not support migrating workspaces.
Error message
`forc migrate` does not support migrating workspaces.
What it means
Error "`forc migrate` does not support migrating workspaces." thrown in FuelLabs/sway.
Source
Thrown at forc-plugins/forc-migrate/src/cli/shared.rs:80
pub(crate) fn experimental_features(&self) -> Result<ExperimentalFeatures> {
let manifest = ManifestFile::from_dir(self.manifest_dir()?)?;
let pkg_manifest = get_pkg_manifest_file(&manifest)?;
Ok(ExperimentalFeatures::new(
&pkg_manifest.project.experimental,
&self.experimental.experimental,
&self.experimental.no_experimental,
)
.map_err(|err| anyhow::anyhow!("{err}"))?)
}
}
// Clippy issue. It erroneously assumes that `vec!`s in `instructive_error` calls are not needed.
#[allow(clippy::useless_vec)]
fn get_pkg_manifest_file(manifest: &ManifestFile) -> Result<&PackageManifestFile> {
match manifest {
ManifestFile::Package(pkg_manifest) => Ok(pkg_manifest),
ManifestFile::Workspace(_) => Err(anyhow::anyhow!(instructive_error(
"`forc migrate` does not support migrating workspaces.",
&vec![
&format!("\"{}\" is a workspace.", manifest.dir().to_string_lossy()),
"Please migrate each workspace member individually.",
]
))),
}
}
// Clippy issue. It erroneously assumes that `vec!`s in `instructive_error` calls are not needed.
#[allow(clippy::useless_vec)]
pub(crate) fn compile_package<'a>(
engines: &'a Engines,
build_instructions: &Compile,
) -> Result<ProgramInfo<'a>> {
let manifest_dir = build_instructions.manifest_dir()?;
let manifest = ManifestFile::from_dir(manifest_dir.clone())?;
let pkg_manifest = get_pkg_manifest_file(&manifest)?;View on GitHub (pinned to 47e5e902fa)
When it happens
Trigger: Thrown at forc-plugins/forc-migrate/src/cli/shared.rs:80 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/2c907ae1a9340ed0.
Report an issue: GitHub.