Show KCL backtraces (#7033)
* Add backtrace to errors * Add display of backtraces with hints * Change pane badge to only show count of errors * Fix property name to not collide with Error superclass * Increase min stack again * Add e2e test that checks that the diagnostics are created in CodeMirror * Remove unneeded code * Change to the new hotness
This commit is contained in:
@ -881,10 +881,10 @@ pub async fn walk_dir(dir: &std::path::PathBuf) -> Result<Vec<std::path::PathBuf
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub async fn recast_dir(dir: &std::path::Path, options: &crate::FormatOptions) -> Result<(), anyhow::Error> {
|
||||
let files = walk_dir(&dir.to_path_buf()).await.map_err(|err| {
|
||||
crate::KclError::Internal(crate::errors::KclErrorDetails {
|
||||
message: format!("Failed to walk directory `{}`: {:?}", dir.display(), err),
|
||||
source_ranges: vec![crate::SourceRange::default()],
|
||||
})
|
||||
crate::KclError::Internal(crate::errors::KclErrorDetails::new(
|
||||
format!("Failed to walk directory `{}`: {:?}", dir.display(), err),
|
||||
vec![crate::SourceRange::default()],
|
||||
))
|
||||
})?;
|
||||
|
||||
let futures = files
|
||||
|
Reference in New Issue
Block a user