{"record":{"id":"4ec8b80c34653f31","repo":"FuelLabs/sway","slug":"err","errorCode":null,"errorMessage":"{err}","messagePattern":"\\{err\\}","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"forc-pkg/src/pkg.rs","lineNumber":2456,"sourceCode":"        let manifest = &plan.manifest_map()[&pkg.id()];\n        let program_ty = manifest.program_type().ok();\n        let dbg_generation = match (profile.is_release(), manifest.project.force_dbg_in_release) {\n            (true, Some(true)) | (false, _) => DbgGeneration::Full,\n            (true, _) => DbgGeneration::None,\n        };\n\n        print_compiling(\n            program_ty.as_ref(),\n            &pkg.name,\n            &pkg.source.display_compiling(manifest.dir()),\n        );\n\n        let experimental = ExperimentalFeatures::new(\n            &manifest.project.experimental,\n            experimental,\n            no_experimental,\n        )\n        .map_err(|err| anyhow!(\"{err}\"))?;\n\n        let descriptor = PackageDescriptor {\n            name: pkg.name.clone(),\n            target,\n            pinned: pkg.clone(),\n            manifest_file: manifest.clone(),\n        };\n\n        let fail = |infos, warnings, errors| {\n            print_on_failure(\n                engines.se(),\n                profile.terse,\n                infos,\n                warnings,\n                errors,\n                profile.reverse_results,\n            );\n            bail!(\"Failed to compile {}\", pkg.name);","sourceCodeStart":2438,"sourceCodeEnd":2474,"githubUrl":"https://github.com/FuelLabs/sway/blob/47e5e902faa42baf652dd6a0c88cd23390c1a614/forc-pkg/src/pkg.rs#L2438-L2474","documentation":"Before compiling a package, forc reconciles the [experimental] table of its Forc.toml with the --experimental/--no-experimental CLI options via ExperimentalFeatures::new. Conflicting or unknown input (a feature enabled in the manifest but disabled on the CLI, or a feature name this forc version does not recognize) returns an error that pkg.rs wraps and rethrows verbatim.","triggerScenarios":"Running forc build while Forc.toml contains [experimental] entries that contradict the CLI flags (e.g. new_encoding = false plus --experimental new_encoding), or listing a feature name unknown to the installed toolchain.","commonSituations":"CI pipelines applying global experimental flags over projects that pin their own experimental set; upgrading forc where an experimental feature was renamed or removed; copy-pasting feature names from changelogs.","solutions":["Make manifest and CLI agree: remove the conflicting flag or flip the [experimental] entry","Check the feature name against the current forc release notes and fix spelling/case","Choose a single source of truth: control features only via the manifest or only via CLI flags"],"exampleFix":"# before: Forc.toml has [experimental] new_encoding = false\n# and you run: forc build --experimental new_encoding\n\n# after (pick one source of truth)\n# Forc.toml: new_encoding = true, no CLI flag","handlingStrategy":"validation","validationCode":"// illustrative: detect manifest/CLI conflicts before calling build\nfn experimental_conflict(\n    manifest_keys: &[String],\n    cli_enable: &[String],\n    cli_disable: &[String],\n) -> bool {\n    manifest_keys.iter().any(|k| cli_disable.iter().any(|d| d == k))\n        || cli_enable.iter().any(|f| cli_disable.contains(f))\n}\n// if experimental_conflict(&toml.experimental_keys(), &opts.experimental, &opts.no_experimental) {\n//     bail!(\"conflicting experimental feature flags\");\n// }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Choose one source of truth for experimental features (manifest or CLI), not both","Pin the forc version in CI so the set of known features is fixed","Fail CI on unknown keys in the [experimental] table"],"tags":["rust","forc","experimental","configuration"],"backgroundTag":null,"analyzedSha":"47e5e902faa42baf652dd6a0c88cd23390c1a614","analyzedAt":"2026-08-16T07:57:45.555Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}