slint-ui/slint · error · std::io::Error
InvalidInput
InvalidInput
Error message
Not an absolute file path: {path_display} What it means
Error "Not an absolute file path: {path_display}" thrown in slint-ui/slint.
Source
Thrown at internal/live-preview/remote/compilation.rs:27
use super::connection::Connection;
pub fn init_compiler(connection: Weak<Connection>) -> slint_interpreter::Compiler {
let mut compiler = slint_interpreter::Compiler::new();
let file_loader_connection = connection.clone();
compiler.set_file_loader(move |path: &std::path::Path| {
let url = Url::from_file_path(path);
let path_display = path.display().to_string();
let connection = file_loader_connection.clone();
Box::pin(async move {
let Some(connection) = connection.upgrade() else {
return Some(Err(std::io::Error::new(
std::io::ErrorKind::BrokenPipe,
"Connection is no longer available",
)));
};
let Ok(url) = url else {
return Some(Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("Not an absolute file path: {path_display}"),
)));
};
Some(
connection.request_file(url).await.map(|file_content| {
String::from_utf8_lossy(&file_content.contents).to_string()
}),
)
})
});
let mapper_connection = connection.clone();
compiler.compiler_configuration(InternalToken).resource_url_mapper =
Some(std::rc::Rc::new(move |url: &Url| {
let connection = mapper_connection.clone();
let url = url.clone();
Box::pin(async move {View on GitHub (pinned to 3fd8f2ec03)
Solutions
- Pass an absolute file path to the remote compilation request.
- Resolve relative paths before sending the request.
When it happens
Trigger: Thrown at internal/live-preview/remote/compilation.rs:27 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slint-ui/slint@3fd8f2ec03 (2026-08-19).
Data as JSON: /api/errors/a3aa8a29eb547fc7.
Report an issue: GitHub.