I have not been using closure tools for awhile and today started an improvement on an old project, first step - rebuild everything to make sure things are in order (new compiler, new template compiler etc).
However I cannot figure out what is wrong with the template compiler: it always says that it cannot find the file:
java -jar ../../templates/new/SoyToJsSrcCompiler.jar --locales en --outputPathFormat '{INPUT_FILE_NAME_NO_EXT}_generated_{LOCALE}.js' --srcs templates/app.soy
Exception in thread "main" java.io.FileNotFoundException: (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:124)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:114)
at com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:287)
at com.google.common.io.CharSource.read(CharSource.java:136)
at com.google.common.io.Files.toString(Files.java:369)
at com.google.template.soy.msgs.SoyMsgBundleHandler.createFromFile(SoyMsgBundleHandler.java:131)
at com.google.template.soy.SoyFileSet.compileToJsSrcFiles(SoyFileSet.java:940)
at com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:307)
at com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:243)
However the file exists and has all the needed permissions (it 666 actually). Tried with and without the `--srcs` flag - the same result always.
ls -al templates/
drwxrwxr-x 2 peterj peterj 4096 Feb 4 00:44 .
drwxrwxr-x 16 peterj peterj 4096 Jul 6 14:07 ..
-rw-rw-rw- 1 peterj peterj 7973 Jun 22 13:15 app.soy
-rw-rw-r-- 1 peterj peterj 147 Feb 3 01:11 README.txt
Java is
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
The compiler is the one downloaded from the link in github repo (prebuilt).
The thing is that it used to work : the original command used was
java -jar ../../templates/SoyToJsSrcCompiler.jar --locales en --messageFilePathFormat "" --shouldProvideRequireSoyNamespaces --shouldGenerateJsdoc --outputPathFormat 'tpl/{INPUT_FILE_NAME_NO_EXT}.soy.js' templates/*.soy ../pstj/templates/*.soy ../smjs/templates/*.soy
It says: INTERNAL SOY ERROR.
I would open an issue but it happens with ALL my soy files, some of them no older than a year and all written in the new syntax..
I hope someone can point me to what might be happening.
Thanks