Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java build keeps spinning after error #3935

Closed
matt2e opened this issue Jan 8, 2025 · 0 comments · Fixed by #3942
Closed

Java build keeps spinning after error #3935

matt2e opened this issue Jan 8, 2025 · 0 comments · Fixed by #3942
Labels
jvm triage Issue needs triaging

Comments

@matt2e
Copy link
Collaborator

matt2e commented Jan 8, 2025

Steps to repro

  • Edit a java file with random words so that it will not compile
  • Run ftl dev <path to modules>
  • Build will fail and status in CLI will show as a red X
  • Edit the java file again, but keeping it as invalid code
  • FTL starts rebuilding the module and fails, but the spinner keeps spinning when it should be a red cross
    • Error log does not contain useful info, instead the error is printed as an info log
    • Maybe the build engine was not notified of the build error?
    • Removing the invalid code does make the build work and for the status to show it as a tick again

Logs:

error:subscriber: Dev mode process exited with error: exit status 1
info:subscriber: Found file changes: *src/main/java/xyz/block/ftl/java/test/subscriber/Subscriber.java
info:subscriber:build: Building module
info:subscriber: Using dev mode build command 'mvn -Dquarkus.console.enabled=false -q clean quarkus:dev -Ddebug=61849'
info: (line 21,col 25) Parse error. Found "this", expected one of  ";" "<" "@" "abstract" "boolean" "byte" "char" "class" "default" "double" "enum" "exports" "final" "float" "int" "interface" "long" "module" "native" "non-sealed" "open" "opens" "permits" "private" "protected" "provides" "public" "record" "requires" "sealed" "short" "static" "strictfp" "synchronized" "to" "transient" "transitive" "uses" "void" "volatile" "when" "with" "yield" "{" "}" <IDENTIFIER>
info: Problem stacktrace : 
info:   com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:14457)
info:   com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:14302)
info:   com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceBody(GeneratedJavaParser.java:1300)
info:   com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceDeclaration(GeneratedJavaParser.java:538)
info:   com.github.javaparser.GeneratedJavaParser.CompilationUnit(GeneratedJavaParser.java:156)
info:   com.github.javaparser.JavaParser.parse(JavaParser.java:125)
info:   com.github.javaparser.JavaParser.parse(JavaParser.java:308)
info:   net.revelc.code.impsort.ImpSort.parseFile(ImpSort.java:130)
info:   net.revelc.code.impsort.maven.plugin.AbstractImpSortMojo.lambda$execute$3(AbstractImpSortMojo.java:309)
info:   java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
info:   java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
info:   java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
info:   java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
info:   java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
info:   java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
info:   java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
info:   java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
info:   java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
info:   java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
info:   java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
info:   java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
info:   java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
info:   java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
info:   java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
info:   java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:960)
info:   java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:934)
info:   java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327)
info:   java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
info:   java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
info:   java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
info:   java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
info:   java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
info:   java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
info: [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.17.5:dev (default-cli) on project subscriber: Unable to execute mojo: Error reading file /Users/mtoohey/Code/ftl/backend/runner/pubsub/testdata/java/subscriber/src/main/java/xyz/block/ftl/java/test/subscriber/Subscriber.java: file: /Users/mtoohey/Code/ftl/backend/runner/pubsub/testdata/java/subscriber/src/main/java/xyz/block/ftl/java/test/subscriber/Subscriber.java; reason: the Java file contained parse errors -> [Help 1]
info: [ERROR] 
info: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
info: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
info: [ERROR] 
info: [ERROR] For more information about the errors and possible solutions, please read the following articles:
info: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
error:subscriber: Dev mode process exited with error: exit status 1
✔[publisher]   ◞[subscriber]  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jvm triage Issue needs triaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant