Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[jvm] better error message when a test exists in a transparent package

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

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
kotlin
Domain
testing

Research direction

Reproduce the failure from ParsedFormsTest.kt and trace the source lookup through SnapshotFileLayoutJUnit5.kt and SnapshotSystemJUnit5.kt. Determine how transparent packages are handled, then make the failure explain the missing source more clearly and verify the resulting message with the affected test.

Written by the indexing model from the issue text.

Description

bug

selfie.* is transparent, so if a test is there, it fails like this:

org.opentest4j.AssertionFailedError: Couldn't find source file for CallLocation(clazz=org.junit.runners.model.FrameworkMethod$1, method=<unknown>, fileName=FrameworkMethod.java, line=-1), looked in TypedPath(absolutePath=/home/runner/work/diffplugdotcom/diffplugdotcom/server/src/test/java/) and [/home/runner/work/diffplugdotcom/diffplugdotcom/server/src/test/resources], maybe there are other source roots?
	at app//com.diffplug.selfie.junit5.FSJava.assertFailed(SnapshotSystemJUnit5.kt:57)
	at app//com.diffplug.selfie.junit5.FSJava.assertFailed(SnapshotSystemJUnit5.kt:43)
	at app//com.diffplug.selfie.guts.FS.assertFailed$default(SnapshotSystem.kt:96)
	at app//com.diffplug.selfie.junit5.SnapshotFileLayoutJUnit5.sourcePathForCall(SnapshotFileLayoutJUnit5.kt:44)
	at app//com.diffplug.selfie.guts.CommentTracker.hasWritableComment(CommentTracker.kt:36)
	at app//com.diffplug.selfie.junit5.SnapshotSystemJUnit5.sourceFileHasWritableComment(SnapshotSystemJUnit5.kt:90)
	at app//com.diffplug.selfie.Mode.canWrite$selfie_lib(Mode.kt:32)
	at app//com.diffplug.selfie.SelfieImplementationsKt.checkSrc(SelfieImplementations.kt:285)
	at app//com.diffplug.selfie.SelfieImplementationsKt.access$checkSrc(SelfieImplementations.kt:1)
	at app//com.diffplug.selfie.StringSelfie.toBe(SelfieImplementations.kt:206)
	at app//selfie.ParsedFormsTest.toMd(ParsedFormsTest.kt:16)
Dominant language
Kotlin
Stars
101
Forks
18
Avg merge
6d 11h
Merged PRs (30d)
5

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.

More from diffplug/selfie

All issues in diffplug/selfie

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.