question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[1.3.0-RC1] Defaults.collectFiles no longer returns expected sources

See original GitHub issue

environment:

$ java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

$ uname -a
Linux 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

steps

$ sbt new playframework/play-java-seed.g8
...
name [play-java-seed]: <enter>
organization [com.example]: <enter>
...
$ cd play-java-seed/
play-java-seed$ echo "sbt.version=1.3.0-RC1" > project/build.properties
play-java-seed$ sbt
[play-java-seed] $ compile

problem

You should see following compiler error:

[info] Compiling 4 Scala sources and 2 Java sources to /tmp/zinc_check/play-java-seed/target/scala-2.12/classes ...
[error] /tmp/zinc_check/play-java-seed/app/controllers/HomeController.java:18:1: cannot find symbol
[error]   symbol:   class index
[error]   location: package views.html
[error] views.html.index
[error] (Compile / compileIncremental) javac returned non-zero exit code
[error] Total time: 6 s, completed May 15, 2019, 12:21:27 PM

expectation

It should compile. It does compile with sbt 1.2.8!

notes

sbt version: 1.3.0-RC1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
eed3si9ncommented, May 15, 2019

@mkurz Thanks for the report!

1reaction
eed3si9ncommented, May 25, 2019

Actually it seems like the problem might be SbtTwirl + sbt 1.3.0-RC1.

Using sbt 1.2.8:

sbt:Play-Framework> show Routes-Compiler/Compile/twirlCompileTemplates/sources
[info] * /Users/eed3si9n/work/playframework/dev-mode/routes-compiler/src/main/twirl/play/routes/compiler/inject/forwardsRouter.scala.twirl
[info] * /Users/eed3si9n/work/playframework/dev-mode/routes-compiler/src/main/twirl/play/routes/compiler/static/routesPrefix.scala.twirl
[info] * /Users/eed3si9n/work/playframework/dev-mode/routes-compiler/src/main/twirl/play/routes/compiler/static/javascriptReverseRouter.scala.twirl
[info] * /Users/eed3si9n/work/playframework/dev-mode/routes-compiler/src/main/twirl/play/routes/compiler/static/reverseRouter.scala.twirl
[info] * /Users/eed3si9n/work/playframework/dev-mode/routes-compiler/src/main/twirl/play/routes/compiler/static/javaWrappers.scala.twirl

using sbt 1.3.0-RC1:

sbt:Play-Framework> show Routes-Compiler/compile:twirlCompileTemplates::sources
[info] *

so that might be a regression on something related to

  def twirlSettings: Seq[Setting[_]] = SbtTwirlCompat.watchSourcesSettings ++ Seq(
    includeFilter in compileTemplates := "*.scala.*",
    excludeFilter in compileTemplates := HiddenFileFilter,
    sourceDirectories in compileTemplates := Seq(sourceDirectory.value / "twirl"),

    sources in compileTemplates := Defaults.collectFiles(
      sourceDirectories in compileTemplates,
      includeFilter in compileTemplates,
      excludeFilter in compileTemplates
    ).value,
Read more comments on GitHub >

github_iconTop Results From Across the Web

PyInstaller Documentation - Read the Docs
PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a...
Read more >
Changelog — pytest documentation
#10060: When running with --pdb , TestCase.tearDown is no longer called for tests when the class has been skipped via unittest.skip or pytest.mark.skip...
Read more >
mozilla-central: changeset 568432 ...
+ + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, ...
Read more >
Release 3.1.0.rc1 IntelMQ Community
default for all installation with deb/rpm packages. ... Once a dataset finished processing in IntelMQ, it is no longer stored in memory.
Read more >
Table 11 :: OIN Linux System - Open Invention Network
Recent Debian kernels are built with APM support but it is disabled by default. You need to boot the kernel with the \"apm=on\"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found