Skip to content

NullPointerException when trying to build with rules_twirl #34

Description

@Srikrishna31

This issue is continuation of #32
After upgrading the version, I have a new problem.

bazel build :App
INFO: Analyzed target //:App (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/l-8296/github_projects/scala_play/app/BUILD:40:1: Compiling twirl template failed (Exit 1): compiler-cli failed: error executing command 
  (cd /home/l-8296/.cache/bazel/_bazel_l-8296/76d33ba2f8986abe556e65dc46b40a5c/execroot/__main__ && \
  exec env - \
  bazel-out/host/bin/external/io_bazel_rules_twirl/compiler-cli/compiler-cli @bazel-out/k8-fastbuild/bin/app/gen/twirl-templates/app/src/main/scala/views/main.html.scala-0.params)
Execution platform: @local_config_platform//:host
java.lang.NullPointerException
        at play.twirl.compiler.TwirlCompiler$.source2TemplateName(TwirlCompiler.scala:245)
        at play.twirl.compiler.TwirlCompiler$.generatedFileVirtual(TwirlCompiler.scala:229)
        at play.twirl.compiler.TwirlCompiler$.compileVirtual(TwirlCompiler.scala:185)
        at rulestwirl.twirl.CommandLineTwirlTemplateCompiler$.work(CommandLineTwirlTemplateCompiler.scala:64)
        at rulestwirl.twirl.CommandLineTwirlTemplateCompiler$.work(CommandLineTwirlTemplateCompiler.scala:9)
        at higherkindness.rules_scala.common.worker.WorkerMain.process$1(WorkerMain.scala:53)
        at higherkindness.rules_scala.common.worker.WorkerMain.main(WorkerMain.scala:73)
        at higherkindness.rules_scala.common.worker.WorkerMain.main$(WorkerMain.scala:22)
        at rulestwirl.twirl.CommandLineTwirlTemplateCompiler$.main(CommandLineTwirlTemplateCompiler.scala:9)
        at rulestwirl.twirl.CommandLineTwirlTemplateCompiler.main(CommandLineTwirlTemplateCompiler.scala)
Target //:App failed to build
INFO: Elapsed time: 10.974s, Critical Path: 10.29s
INFO: 15 processes: 14 linux-sandbox, 1 worker.
FAILED: Build did NOT complete successfully

My index.scala.html and main.scala.html are very simple files. main.scala.html doesn't take any parameters, and that might be causing a NullPointerException?
It's the same PR: Srikrishna31/scala_play#9
Thanks,
Krishna Addepalli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions