playframework / playframework/play-samples

play-scala-starter-example will not compile against Scala 3.3.6 in MS Code Metals

Open
#923 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
554
Forks
548
Avg merge
1d 11h
Merged PRs (30d)
57

Description

To reproduce I checked out this repo and went into play-scala-starter-example directory.
Changed scalaVersion to:
scalaVersion := "3.3.6"
in build.sbt

If I now run:
sbt run
The example compiles and runs fine.

But if I try to compile directly in Microsoft VS Code (using the Metals Extension) I get numerous errors like:

The import router.RoutesPrefix cannot be resolved

These errors are in the generated routes.java file that is generated.
I have similar issues with the files generated by twirl in another project.

Would you expect these examples to compile in VS Code Metals plugin when using scala 3.3.6?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the play-scala-starter-example directory by reviewing build.sbt with Scala 3.3.6, then compare sbt run with compilation through the Metals extension. Inspect the generated routes.java file and its unresolved router.RoutesPrefix import; done means the example compiles in VS Code Metals without these errors, or the expected limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
backend, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.