[jvm] better error message when a test exists in a transparent package
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from diffplug/selfie
-
Selfie JVM Snapshot Garbage Collection is overly zealous when using multiple test suites in gradle Openbug jvm
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
enhancement jvm
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
bug jvm
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug docs jvm
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
-
bug jvm py
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
libre-tube/LibreTube#8803 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Telegram !!! Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Xposed-Modules-Repo/com.fuck.iab#24 · 3 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
SimonHalvdansson/Harmonic-HN#361 ·