more updates for kcl-samples (#5696)
* screenshots and step Signed-off-by: Jess Frazelle <github@jessfraz.com> * automations Signed-off-by: Jess Frazelle <github@jessfraz.com> * add manifest generation Signed-off-by: Jess Frazelle <github@jessfraz.com> * small refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * update readme Signed-off-by: Jess Frazelle <github@jessfraz.com> * write the readme Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes for comments Signed-off-by: Jess Frazelle <github@jessfraz.com> * derive-docs tests updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * update all the generated artifact commands, since we dont need to clear scene at the start of run so we dont need to recreate all the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -152,7 +152,7 @@ impl KclErrorWithOutputs {
|
||||
source_files: Default::default(),
|
||||
}
|
||||
}
|
||||
pub fn into_miette_report_with_outputs(self) -> anyhow::Result<ReportWithOutputs> {
|
||||
pub fn into_miette_report_with_outputs(self, code: &str) -> anyhow::Result<ReportWithOutputs> {
|
||||
let mut source_ranges = self.error.source_ranges();
|
||||
|
||||
// Pop off the first source range to get the filename.
|
||||
@ -164,12 +164,19 @@ impl KclErrorWithOutputs {
|
||||
.source_files
|
||||
.get(&first_source_range.module_id())
|
||||
.cloned()
|
||||
.ok_or_else(|| {
|
||||
anyhow::anyhow!(
|
||||
"Could not find source file for module id: {:?}",
|
||||
first_source_range.module_id()
|
||||
)
|
||||
})?;
|
||||
.unwrap_or(ModuleSource {
|
||||
source: code.to_string(),
|
||||
path: self
|
||||
.filenames
|
||||
.get(&first_source_range.module_id())
|
||||
.ok_or_else(|| {
|
||||
anyhow::anyhow!(
|
||||
"Could not find filename for module id: {:?}",
|
||||
first_source_range.module_id()
|
||||
)
|
||||
})?
|
||||
.clone(),
|
||||
});
|
||||
let filename = source.path.to_string();
|
||||
let kcl_source = source.source.to_string();
|
||||
|
||||
|
Reference in New Issue
Block a user