Skip to content

Commit 477638a

Browse files
committed
Inline helper
1 parent e7a5f7a commit 477638a

1 file changed

Lines changed: 5 additions & 33 deletions

File tree

rewatch/src/build/compile.rs

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -628,37 +628,6 @@ pub fn compiler_args(
628628
.concat())
629629
}
630630

631-
/// Generate compiler arguments for stdout output (no file write).
632-
/// This is a convenience wrapper around `compiler_args` with `OutputMode::ToStdout`.
633-
pub fn compiler_args_for_stdout(
634-
config: &config::Config,
635-
ast_path: &Path,
636-
file_path: &Path,
637-
has_interface: bool,
638-
project_context: &ProjectContext,
639-
packages: &Option<&AHashMap<String, packages::Package>>,
640-
is_type_dev: bool,
641-
is_local_dep: bool,
642-
warn_error_override: Option<String>,
643-
module_format: &str,
644-
) -> Result<Vec<String>> {
645-
compiler_args(
646-
config,
647-
ast_path,
648-
file_path,
649-
false, // not interface - we want implementation output
650-
has_interface,
651-
project_context,
652-
packages,
653-
is_type_dev,
654-
is_local_dep,
655-
warn_error_override,
656-
OutputMode::ToStdout {
657-
module_format: module_format.to_string(),
658-
},
659-
)
660-
}
661-
662631
/// Compile a single file and return its JavaScript output on stdout.
663632
/// This is used by `compile_one` for the target file only.
664633
pub fn compile_file_to_stdout(
@@ -690,17 +659,20 @@ pub fn compile_file_to_stdout(
690659
let has_interface = module.get_interface().is_some();
691660
let is_type_dev = module.is_type_dev;
692661

693-
let args = compiler_args_for_stdout(
662+
let args = compiler_args(
694663
&package.config,
695664
ast_path,
696665
implementation_file_path,
666+
false, // not interface - we want implementation output
697667
has_interface,
698668
project_context,
699669
&Some(packages),
700670
is_type_dev,
701671
package.is_local_dep,
702672
warn_error_override,
703-
module_format,
673+
OutputMode::ToStdout {
674+
module_format: module_format.to_string(),
675+
},
704676
)?;
705677

706678
let output = Command::new(&compiler_info.bsc_path)

0 commit comments

Comments
 (0)