Skip to content

Support for .test.java#4261

Merged
Gedochao merged 2 commits into
VirtusLab:mainfrom
Gedochao:feature/test-dot-java
May 12, 2026
Merged

Support for .test.java#4261
Gedochao merged 2 commits into
VirtusLab:mainfrom
Gedochao:feature/test-dot-java

Conversation

@Gedochao
Copy link
Copy Markdown
Contributor

@Gedochao Gedochao commented May 8, 2026

Fixes #4245

This adds full support of *.test.java inputs being recognised as test scope sources, automatically.

As public classes in Java inputs have to be in PublicClassName.java sources, arbitrarily, Scala CLI generates a PublicClassName.java source out of a PublicClassName.test.java under the hood to make javac happy. It's a bit hacky, but I think it's worth it for the consistent UX.

Checklist

  • tested the solution locally and it works
  • ran the code formatter (scala-cli fmt .)
  • ran scalafix (./mill -i __.fix)

How much have your relied on LLM-based tools in this contribution?

Extensively, Cursor + Claude

How was the solution tested?

included unit and integration tests for all the ways a Java input can be classified as a test scope source (directive, .test.java, test dir)

@Gedochao Gedochao force-pushed the feature/test-dot-java branch from 5c08fbc to 865857f Compare May 11, 2026 11:55
@Gedochao Gedochao marked this pull request as ready for review May 11, 2026 12:18
@Gedochao Gedochao requested review from tgodzik and zielinsky May 11, 2026 12:18
Copy link
Copy Markdown
Member

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGtM

@Gedochao Gedochao enabled auto-merge May 12, 2026 10:35
@Gedochao Gedochao merged commit 6678f5b into VirtusLab:main May 12, 2026
258 of 265 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include .test.java files to the test scope

2 participants