From 564a2a7f4feb6f53b5aeff38a73f30dc275d4437 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 9 Mar 2025 21:52:45 +0000 Subject: Remove duplication of path to binary --- src/main/java/org/shedlang/compiler/ShedCompiler.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/org/shedlang/compiler/ShedCompiler.java') diff --git a/src/main/java/org/shedlang/compiler/ShedCompiler.java b/src/main/java/org/shedlang/compiler/ShedCompiler.java index e2be53a2..845da159 100644 --- a/src/main/java/org/shedlang/compiler/ShedCompiler.java +++ b/src/main/java/org/shedlang/compiler/ShedCompiler.java @@ -30,7 +30,7 @@ import static org.shedlang.compiler.sourcefiles.SourceFiles.collectSourceFiles; import static org.shedlang.compiler.typechecker.NamespaceDependencyLineariser.orderNamespaces; public class ShedCompiler { - public void compile( + public TargetDir compile( Path projectRoot, Backend backend, Optional profileName @@ -85,17 +85,17 @@ public class ShedCompiler { var profileConfig = profileName.map(config::profile) .orElse(ProfileConfig.DEFAULT); + var targetDir = config.targetDir(backend, profileConfig); + backend.compile( config, profileConfig, namespaces, typeInfos, - new TargetDir( - config.targetDir() - .resolve(backend.targetName()) - .resolve(profileConfig.name()) - ) + targetDir ); + + return targetDir; } /** -- cgit v1.2.3