You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Err(_) => match helpers::try_package_path(package_config, project_context,"@rescript/runtime"){
346
-
Ok(runtime_path) => Ok(vec![
347
-
"-runtime-path".to_string(),
348
-
runtime_path.to_string_lossy().to_string(),
349
-
]),
351
+
Ok(runtime_path) => Ok(runtime_path),
350
352
Err(err) => Err(anyhow!(
351
353
"The rescript runtime package could not be found.\nPlease set RESCRIPT_RUNTIME environment variable or make sure the runtime package is installed.\nError: {err}"
352
354
)),
353
355
},
354
-
}
356
+
}?;
357
+
358
+
let _ = RUNTIME_PATH_MEMO.set(resolved.clone());
359
+
Ok(resolved)
360
+
}
361
+
362
+
pubfnget_runtime_path_args(
363
+
package_config:&Config,
364
+
project_context:&ProjectContext,
365
+
) -> Result<Vec<String>>{
366
+
let runtime_path = get_runtime_path(package_config, project_context)?;
367
+
Ok(vec![
368
+
"-runtime-path".to_string(),
369
+
runtime_path.to_string_lossy().to_string(),
370
+
])
355
371
}
356
372
357
373
pubfncompiler_args(
@@ -581,7 +597,7 @@ fn compile_file(
581
597
letBuildState{
582
598
packages,
583
599
project_context,
584
-
bsc_path,
600
+
compiler_info,
585
601
..
586
602
} = build_state;
587
603
let root_config = build_state.get_root_config();
@@ -612,7 +628,7 @@ fn compile_file(
612
628
package.is_local_dep,
613
629
)?;
614
630
615
-
let to_mjs = Command::new(bsc_path)
631
+
let to_mjs = Command::new(&compiler_info.bsc_path)
0 commit comments