blangSDK icon indicating copy to clipboard operation
blangSDK copied to clipboard

FileAlreadyExistsException thrown running blang

Open amcpherson opened this issue 6 years ago • 2 comments

I have installed blang using

bash workspace/blangSDK/setup-cli.sh
Exception in thread "main" java.lang.RuntimeException: java.nio.file.FileAlreadyExistsException: results/all/2018-11-19-20-39-05-CWiEBbRl.exec/blang-compilation/src/main/java/Helpers.java
	at blang.runtime.internals.StandaloneCompiler.init(StandaloneCompiler.java:179)
	at blang.runtime.internals.StandaloneCompiler.<init>(StandaloneCompiler.java:47)
	at blang.runtime.internals.Main.main(Main.java:24)
Caused by: java.nio.file.FileAlreadyExistsException: results/all/2018-11-19-20-39-05-CWiEBbRl.exec/blang-compilation/src/main/java/Helpers.java
	at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:551)
	at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
	at java.nio.file.Files.copy(Files.java:1274)
	at blang.runtime.internals.StandaloneCompiler$FileTransferProcessor.visitFile(StandaloneCompiler.java:189)
	at blang.runtime.internals.StandaloneCompiler$FileTransferProcessor.visitFile(StandaloneCompiler.java:184)
	at java.nio.file.Files.walkFileTree(Files.java:2670)
	at java.nio.file.Files.walkFileTree(Files.java:2742)
	at blang.runtime.internals.StandaloneCompiler.init(StandaloneCompiler.java:177)
	... 2 more

amcpherson avatar Nov 20 '18 04:11 amcpherson

This issue exists on Mac when using the blang IDE download, not an issue for the blangSDK.

amcpherson avatar Nov 20 '18 05:11 amcpherson

Two things to try (I suspect the second one is the more likely given the error message)

  • When installing via setup-cli.sh, make sure to call it in the current dir i.e. via ./setup-cli.sh
  • After install, the command blang should be ran in a directory in which blangSDK is not accessible. E.g. a clean directory containing only the .bl file to run and other supporting files.

Hope this helps!

alexandrebouchard avatar Nov 20 '18 06:11 alexandrebouchard