buck version 2f85dfcca9912615f50a8d6be37c47f20e53907a
git clone https://github.com/fbsamples/bucksamples.git
cd bucksamples/hello-buck-java
buck project --ide intellij //...
Starting new Buck daemon...
Buck daemon started.
Generating project: finished in 0.8 sec
Buck encountered an internal error
java.lang.IllegalArgumentException: resource templates.stg relative to com.facebook.buck.features.project.intellij.StringTemplateFile not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:434)
at com.google.common.io.Resources.getResource(Resources.java:209)
at com.facebook.buck.features.project.intellij.StringTemplateFile.lambda$0(StringTemplateFile.java:49)
at com.facebook.buck.util.function.ThrowingSupplier.lambda$1(ThrowingSupplier.java:41)
at com.facebook.buck.util.AbstractMemoizer.get(AbstractMemoizer.java:42)
at com.facebook.buck.util.Memoizer.get(Memoizer.java:1)
at com.facebook.buck.util.Memoizer.get(Memoizer.java:30)
at com.facebook.buck.util.MoreSuppliers$MemoizingSupplier.get(MoreSuppliers.java:82)
at com.facebook.buck.features.project.intellij.StringTemplateFile.getST(StringTemplateFile.java:59)
at com.facebook.buck.features.project.intellij.IjProjectWriter.writeModule(IjProjectWriter.java:217)
at com.facebook.buck.features.project.intellij.IjProjectWriter.lambda$0(IjProjectWriter.java:104)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408)
at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:661)
at com.facebook.buck.features.project.intellij.IjProjectWriter.write(IjProjectWriter.java:101)
at com.facebook.buck.features.project.intellij.IjProject.performWriteOrUpdate(IjProject.java:148)
at com.facebook.buck.features.project.intellij.IjProject.write(IjProject.java:71)
at com.facebook.buck.features.project.intellij.IjProjectCommandHelper.writeProjectAndGetRequiredBuildTargets(IjProjectCommandHelper.java:260)
at com.facebook.buck.features.project.intellij.IjProjectCommandHelper.runIntellijProjectGenerator(IjProjectCommandHelper.java:208)
at com.facebook.buck.features.project.intellij.IjProjectCommandHelper.parseTargetsAndRunProjectGenerator(IjProjectCommandHelper.java:201)
at com.facebook.buck.features.project.intellij.IjProjectSubCommand.run(IjProjectSubCommand.java:210)
at com.facebook.buck.cli.ProjectCommand.runWithoutHelp(ProjectCommand.java:147)
at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:281)
at com.facebook.buck.cli.AbstractContainerCommand.run(AbstractContainerCommand.java:90)
at com.facebook.buck.cli.MainRunner.runMainWithExitCode(MainRunner.java:1448)
at com.facebook.buck.cli.MainRunner.runMainThenExit(MainRunner.java:476)
at com.facebook.buck.cli.MainWithNailgun.nailMain(MainWithNailgun.java:77)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.facebook.nailgun.NGSession.runImpl(NGSession.java:313)
at com.facebook.nailgun.NGSession.run(NGSession.java:199)
Direct use of generated buck-out/gen/ce9b6f2e/programs/buck.pex works as expected, seems a problem that just occurs using the bin/buck script as an entrypoint.