@@ -288,13 +288,14 @@ fn format_target_result_error(
288288 report : & wac_types:: TargetValidationReport ,
289289) -> anyhow:: Error {
290290 let mut error_string = format ! (
291- "Component {} ({}) can't run in environment {} because world {} ...\n " ,
292- component_id, source_description, env_name, target_world_name
291+ "Component {component_id} ({source_description}) can't run in environment {env_name} (world {target_world_name}).\n " ,
293292 ) ;
294293
295294 for ( idx, import) in report. imports_not_in_target ( ) . enumerate ( ) {
296295 if idx == 0 {
297- error_string. push_str ( "... requires imports named\n - " ) ;
296+ error_string. push_str (
297+ "The component requires the following imports, which the environment does not provide:\n - " ,
298+ ) ;
298299 } else {
299300 error_string. push_str ( " - " ) ;
300301 }
@@ -304,7 +305,9 @@ fn format_target_result_error(
304305
305306 for ( idx, ( export, export_kind) ) in report. missing_exports ( ) . enumerate ( ) {
306307 if idx == 0 {
307- error_string. push_str ( "... requires exports named\n - " ) ;
308+ error_string. push_str (
309+ "The environment requires the following exports, which the component does not provide:\n - " ,
310+ ) ;
308311 } else {
309312 error_string. push_str ( " - " ) ;
310313 }
@@ -315,7 +318,7 @@ fn format_target_result_error(
315318 }
316319
317320 for ( name, extern_kind, error) in report. mismatched_types ( ) {
318- error_string. push_str ( "... found a type mismatch for " ) ;
321+ error_string. push_str ( "Found a type mismatch for " ) ;
319322 error_string. push_str ( & format ! ( "{extern_kind} {name}: {error}" ) ) ;
320323 }
321324
0 commit comments