Skip to content

Commit

Permalink
Merge pull request quarkusio#23271 from michalszynkiewicz/dev-mode-co…
Browse files Browse the repository at this point in the history
…mpilation-order-fix

Compile generated sources before src in dev mode
  • Loading branch information
michalszynkiewicz authored Jan 29, 2022
2 parents 92c0468 + 5cfb900 commit 644e46f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ public Optional<CompilationUnit> getTest() {
return Optional.ofNullable(test);
}

public void addSourcePathFirst(String path) {
String absolutePath = Paths.get(path).isAbsolute() ? path
: (projectDirectory + File.separator + path);
this.main.sourcePaths = this.main.sourcePaths.addFirst(Paths.get(absolutePath));
}

public static class Builder {

private ArtifactKey appArtifactKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.quarkus.deployment.dev;

import static io.quarkus.deployment.dev.testing.MessageFormat.BLUE;
import static java.util.Collections.singleton;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down Expand Up @@ -444,7 +443,7 @@ public boolean test(String s) {
module.getSourceParents(),
Paths.get(module.getPreBuildOutputDir()),
Paths.get(module.getTargetDir()),
sourcePath -> module.addSourcePaths(singleton(sourcePath.toAbsolutePath().toString()))));
sourcePath -> module.addSourcePathFirst(sourcePath.toAbsolutePath().toString())));
}
}
RuntimeUpdatesProcessor.INSTANCE = setupRuntimeCompilation(context, (Path) params.get(APP_ROOT),
Expand Down

0 comments on commit 644e46f

Please sign in to comment.