lf-lang / vscode-lingua-franca

Lingua Franca extension for Visual Studio Code
Other
5 stars 3 forks source link

`FileAlreadyExistsException` prints stack trace but VS Code does not flag compilation as failed #53

Open lhstrh opened 2 years ago

lhstrh commented 2 years ago

The following was printed:

SEVERE: Internal error: java.nio.file.FileAlreadyExistsException: /home/marten/furuta-pendulum/src-gen/FurutaPendulum/FurutaPendulum
java.util.concurrent.CompletionException: java.nio.file.FileAlreadyExistsException: /home/marten/furuta-pendulum/src-gen/FurutaPendulum/FurutaPendulum
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.nio.file.FileAlreadyExistsException: /home/marten/furuta-pendulum/src-gen/FurutaPendulum/FurutaPendulum
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:397)
    at java.base/java.nio.file.Files.createDirectory(Files.java:700)
    at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807)
    at java.base/java.nio.file.Files.createDirectories(Files.java:753)
    at org.lflang.generator.c.CGenerator.copyUserFiles(CGenerator.java:1043)
    at org.lflang.generator.GeneratorBase.doGenerate(GeneratorBase.java:346)
    at org.lflang.generator.c.CGenerator.doGenerate(CGenerator.java:506)
    at org.lflang.generator.LFGenerator.doGenerate(LFGenerator.java:164)
    at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:44)
    at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:35)
    at org.lflang.generator.IntegratedBuilder.doGenerate(IntegratedBuilder.java:131)
    at org.lflang.generator.IntegratedBuilder.run(IntegratedBuilder.java:95)
    at org.lflang.diagram.lsp.LFLanguageServerExtension.buildWithProgress(LFLanguageServerExtension.java:120)
    at org.lflang.diagram.lsp.LFLanguageServerExtension.lambda$1(LFLanguageServerExtension.java:93)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)

Yet, VS Code reported a successful compilation.

lhstrh commented 1 year ago

This was marked as invalid. Does that mean that the report is invalid? In that case, we should close this issue.

petervdonovan commented 1 year ago

Oops, I didn't know that that was what that meant. To my knowledge this issue should still be open.