From 2ac6a7c9286742e5ffa0b1814e0b7fc227ccb0a0 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Fri, 8 Jun 2012 17:57:03 +0400 Subject: [PATCH] fix message order in namespace codegen --- .../org/jetbrains/jet/codegen/NamespaceCodegen.java | 13 ++++++++++--- .../data/antTaskJvm/build.log.expected | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java index 2c1511f92b2..383b6c87a35 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java @@ -77,7 +77,7 @@ public class NamespaceCodegen { } - public void generate(CompilationErrorHandler errorHandler, Progress progress) { + public void generate(CompilationErrorHandler errorHandler, final Progress progress) { ArrayList>> byFile = new ArrayList>>(); for (JetFile file : files) { @@ -96,8 +96,15 @@ public class NamespaceCodegen { for (JetFile file : files) { VirtualFile vFile = file.getVirtualFile(); try { - String path = vFile != null ? vFile.getPath() : "no_virtual_file/" + file.getName(); - if(progress != null) progress.log("For source: " + path); + final String path = vFile != null ? vFile.getPath() : "no_virtual_file/" + file.getName(); + if (progress != null) { + v.addOptionalDeclaration(new ClassBuilderOnDemand.ClassBuilderCallback() { + @Override + public void doSomething(@NotNull ClassBuilder classBuilder) { + progress.log("For source: " + path); + } + }); + } generate(file, multiFile); } catch (ProcessCanceledException e) { diff --git a/compiler/integration-tests/data/antTaskJvm/build.log.expected b/compiler/integration-tests/data/antTaskJvm/build.log.expected index 3f171971523..6dd594e38f9 100644 --- a/compiler/integration-tests/data/antTaskJvm/build.log.expected +++ b/compiler/integration-tests/data/antTaskJvm/build.log.expected @@ -2,8 +2,8 @@ OUT Buildfile: build.xml OUT OUT build: OUT [kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar] -OUT [kotlinc] LOGGING: For source: [TestData]/hello.kt OUT [kotlinc] LOGGING: Emitting: Hello/namespace.class +OUT [kotlinc] LOGGING: For source: [TestData]/hello.kt OUT OUT BUILD SUCCESSFUL OUT Total time: [time]