···188188 segments when compiling a function with a JavaScript external.
189189 ([Giacomo Cavalieri](https://github.com/giacomocavalieri))
190190191191+- A `gleam@@compile.erl` is no longer left in the build output of
192192+ `gleam compile-package`.
193193+ ([Louis Pilfold](https://github.com/lpil))
194194+191195- When using the language server to extract a function from within the body of a
192196 use statement, only the selected statement(s) are extracted.
193197
···4747 } else {
4848 &cli::Reporter
4949 };
5050+ let target = options.target.unwrap_or(root_config.target);
5051 let io = fs::ProjectIO::new();
5252+ // Initialise the BEAM compiler instance eagerly, so we don't have to wait
5353+ // for it to boot when we come to use it for the first time.
5454+ if target.is_erlang() {
5555+ io.initialise_beam_compiler()?;
5656+ }
5157 let start = Instant::now();
5252- let lock = BuildLock::new_target(
5353- paths,
5454- options.mode,
5555- options.target.unwrap_or(root_config.target),
5656- )?;
5858+ let lock = BuildLock::new_target(paths, options.mode, target)?;
57595860 tracing::info!("Compiling packages");
5961 let result = {
···2929 let paths = ProjectPaths::new(options.package_directory.clone());
3030 let config = config::read(paths.root_config())?;
31313232+ let io = ProjectIO::new();
3333+ // Initialise the BEAM compiler instance eagerly, so we don't have to wait
3434+ // for it to boot when we come to use it for the first time.
3535+ if options.target.is_erlang() && !options.skip_beam_compilation {
3636+ io.initialise_beam_compiler()?;
3737+ }
3838+3239 let target = match options.target {
3340 Target::Erlang => TargetCodegenConfiguration::Erlang { app_file: None },
3441 Target::JavaScript => TargetCodegenConfiguration::JavaScript {
···5057 &options.libraries_directory,
5158 &target,
5259 ids,
5353- ProjectIO::new(),
6060+ io,
5461 );
5562 compiler.write_entrypoint = false;
5663 compiler.write_metadata = true;