Skip to content

Commit 1a777ff

Browse files
ryo33claude
andcommitted
Improve error messages and unify URL/path resolution
- Add file path to error messages in util.rs for better debugging - Add TextFile::resolve() for consistent URL vs local path handling - Fix bug where URLs were incorrectly joined with local directories 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 0909944 commit 1a777ff

File tree

10 files changed

+249
-65
lines changed

10 files changed

+249
-65
lines changed

Cargo.lock

Lines changed: 209 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ tracing-subscriber = "0.3"
4444
query-flow = "0.12"
4545
glob = "0.3"
4646
url = "2"
47-
reqwest = { version = "0.13", default-features = false, features = ["blocking"] }
47+
reqwest = { version = "0.13", features = ["blocking"] }
4848

4949
# For faster parser generation
5050
[profile.dev.package.parol]

crates/eure-cli/src/util.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,16 @@ where
9090
if let Some(file) = pending.key::<TextFile>() {
9191
match file {
9292
TextFile::Local(path) => {
93-
let content = TextFileContent(fs::read_to_string(path.as_ref())?);
93+
let path_ref = path.as_ref();
94+
let content = fs::read_to_string(path_ref).map_err(|e| {
95+
std::io::Error::new(
96+
e.kind(),
97+
format!("{}: {}", path_ref.display(), e),
98+
)
99+
})?;
94100
runtime.resolve_asset(
95101
file.clone(),
96-
content,
102+
TextFileContent(content),
97103
DurabilityLevel::Static,
98104
);
99105
}

0 commit comments

Comments
 (0)