Support finding caller of a companion object#13
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13 +/- ##
============================================
- Coverage 87.47% 86.84% -0.63%
- Complexity 124 127 +3
============================================
Files 15 17 +2
Lines 471 479 +8
Branches 59 62 +3
============================================
+ Hits 412 416 +4
- Misses 46 49 +3
- Partials 13 14 +1 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Also: * Improve the layout of parameter docs.
I usually address them right after its review, and I think I've addressed most of them already. Those that I did not address, I commented with a reason. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR extends the CallerFinder to support finding stackframes that call companion object functions even when the enclosing class is given as an argument. Additionally, it applies the latest configuration updates, migrates nullability annotations to JSpecify, and adds AI Agent guidelines.
- Adds companion object support to
StackGetterimplementations - Migrates from
javax.annotationto JSpecify nullability annotations - Updates project dependencies and build configuration to latest versions
Reviewed Changes
Copilot reviewed 263 out of 279 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/kotlin/io/spine/reflect/StackWalkerStackGetter.kt | Adds companion object detection logic with helper function |
| src/main/kotlin/io/spine/reflect/ThrowableStackGetter.kt | Updates to use new companion object detection |
| src/test/kotlin/io/spine/reflect/given/ClassWithCompanion.kt | Test classes for companion object functionality |
| src/test/kotlin/io/spine/reflect/AbstractStackGetterSpec.kt | Test case for companion object caller finding |
| pom.xml | Dependency version updates including Guava, Protobuf, and Kotlin |
Files not reviewed (5)
- .idea/codeStyles/Project.xml: Language not supported
- .idea/dictionaries/common.xml: Language not supported
- .idea/inspectionProfiles/Project_Default.xml: Language not supported
- .idea/kotlinc.xml: Language not supported
- .idea/misc.xml: Language not supported
Comments suppressed due to low confidence (1)
pom.xml:35
- Protobuf version 4.31.0 appears to be invalid. The latest stable version of Protocol Buffers is in the 3.x series (e.g., 3.25.x). Version 4.31.0 does not exist in the official Protocol Buffers releases.
<version>4.31.0</version>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR extends the
CallerFinderso that it can find a stackframe which calls acompanion objectfunction even if the enclosing class is given as an argument.Other notable changes
configwas applied.