slint-ui/slint · error
slint package ' ' outside of the repository?
Error message
slint package '{}' outside of the repository? What it means
In check_dependencies, every dependency named `slint*` or `i-slint*` inside repository crates must be declared with a `path` to an in-repo crate (plus the pinned version). A CargoDependency::Full entry with an empty path means the dependency resolves from crates.io instead of the local workspace, which would mix released and in-development slint versions. The check rejects this with a rhetorical 'outside of the repository?' message.
Solutions
- Add the `path` key pointing at the local crate, e.g. `slint = { version = "=1.x.y", path = "../../api/rs/slint" }`.
- If the dependency genuinely is external, use `CargoDependency::Workspace` (workspace inheritance) rather than a version-only entry.
- Check whether the dependency should be listed under `[dependencies]` at all, or whether it belongs in the workspace root's dependency table.
Example fix
// before
slint = "1.8"
// after
slint = { version = "=1.8.0", path = "../../api/rs/slint" } Defensive patterns
Strategy: validation
Validate before calling
const dep = toml.parse(fs.readFileSync('Cargo.toml')).dependencies.slint;
if (typeof dep === 'string' || !dep.path) throw new Error('slint dep needs a path'); Prevention
- Never add version-only slint/i-slint dependencies to in-repo crates.
- Copy dependency declarations from a sibling crate that already passes the check.
- Run `cargo xtask` checks locally before pushing.
When it happens
Trigger: Adding `slint = "1.x"` (version-only, no `path`) to a Cargo.toml of a crate that the license/Cargo.toml xtask check covers; copying a dependency line from the published slint examples into an internal crate.
Common situations: Adding a new example or tool crate and pasting the crates.io dependency snippet from docs; forgetting that internal crates must use path + version; an edit that dropped the `path = "..."` key during refactoring.
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
- Version " " must be specified for dependency
- cargo failed
- dev-dependencies cannot be from the workspace because…
- Incorrect . Found expected
- Missing description field
AI-assisted analysis of slint-ui/slint@3a7e700487 (2026-09-16).
Data as JSON: /api/errors/923cd123d1d26ff5.
Report an issue: GitHub.
Appendix: source
Thrown at xtask/src/license_headers_check.rs:1171
}
Ok(())
}
fn check_dependencies(&self, doc: &CargoToml, expected_version: &str) -> Result<()> {
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") {View on GitHub (pinned to 3a7e700487)