slint-ui/slint · error
Version " " must be specified for dependency
Error message
Version "{}" must be specified for dependency {} What it means
For in-repo `slint*`/`i-slint*` dependencies that do have a `path`, the version string must exactly match the expected version of the current release line (checked against `expected_version` in check_dependencies). A mismatched version would publish crates claiming compatibility with a different slint release than the one in-tree.
Solutions
- Update the dependency's `version` in Cargo.toml to the expected version reported in the error (e.g. `version = "=1.8.0"`).
- Run the xtask release/version-bump command so all Cargo.toml files are updated consistently.
- Diff against another crate's Cargo.toml that passed the check to copy the correct version string.
Example fix
// before
i-slint-core = { version = "=1.7.0", path = "../../internal/core" }
// after
i-slint-core = { version = "=1.8.0", path = "../../internal/core" } Defensive patterns
Strategy: validation
Validate before calling
const EXPECTED = '1.8.0';
const v = toml.parse(fs.readFileSync('Cargo.toml')).dependencies['i-slint-core'].version;
if (v !== `=${EXPECTED}`) throw new Error(`version ${v} != =${EXPECTED}`); Prevention
- Use the xtask version-bump command instead of hand-editing versions.
- Grep for old version strings across all Cargo.toml files during a release.
- Keep dependency version strings identical to the workspace release version.
When it happens
Trigger: Bumping the slint version in one place but not in a crate's Cargo.toml dependency declaration; hand-editing the version string; merging a release branch where the version constant and Cargo.toml files drifted.
Common situations: Release preparation (`xtask release`) where one Cargo.toml was missed; cherry-picking a crate from an older branch; adding a dependency by copying the version from docs instead of the current release version.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- slint package ' ' outside of the repository?
- failed: exited with
- cargo failed
- dev-dependencies cannot be from the workspace because…
- field is not a string
AI-assisted analysis of slint-ui/slint@3a7e700487 (2026-09-16).
Data as JSON: /api/errors/778c8c52b869256a.
Report an issue: GitHub.
Appendix: source
Thrown at xtask/src/license_headers_check.rs:1177
let expected_version = format!("={expected_version}");
for (dep_name, dep) in doc
.dependencies("dependencies")
.iter()
.chain(doc.dependencies("build-dependencies").iter())
{
if dep_name.starts_with("slint") || dep_name.starts_with("i-slint") {
match dep {
CargoDependency::Workspace => (),
CargoDependency::Full { path, version } => {
if path.is_empty() {
return Err(anyhow!(
"slint package '{}' outside of the repository?",
dep_name
));
}
if version != &expected_version {
return Err(anyhow!(
"Version \"{}\" must be specified for dependency {}",
expected_version,
dep_name
));
}
}
}
}
}
for (dep_name, dep) in doc.dependencies("dev-dependencies").iter() {
if dep_name.starts_with("slint") || dep_name.starts_with("i-slint") {
match dep {
CargoDependency::Workspace => {
return Err(anyhow!(
"dev-dependencies cannot be from the workspace because version must be empty {dep_name}"
));
}View on GitHub (pinned to 3a7e700487)