feat: array/list parameter support for Gestalt-DI annotations#160
feat: array/list parameter support for Gestalt-DI annotations#160BenjaminAmos wants to merge 3 commits intodevelopfrom
Conversation
2d99dbb to
b2a6b05
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughSmall cross-module changes: prevented a bean context from closing itself, bumped JavaPoet, made annotation-value formatting type-aware, fixed classpath file vs directory path construction, and adjusted snapshot detection to use presence semantics. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@gestalt-inject-java/src/main/java/org/terasology/gestalt/annotation/processing/BeanDefinitionProcessor.java`:
- Line 247: In the values.add(...) call that currently passes
executableElement.asType() into getValue(...), replace asType() with
executableElement.getReturnType() so getValue() receives the annotation member's
return type (not the full executable signature); update the invocation near
values.add(CodeBlock.of("$S,$L", executableElement.getSimpleName(),
getValue(executableElement.asType(), value.getValue()))) to use getReturnType()
to fix enum detection and correct empty-array literal generation (consistent
with the earlier usage at line 238).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8c5540a6-e2c1-414e-a2da-b99e7eb25ec1
📒 Files selected for processing (5)
gestalt-di/src/main/java/org/terasology/gestalt/di/DefaultBeanContext.javagestalt-inject-java/build.gradle.ktsgestalt-inject-java/src/main/java/org/terasology/gestalt/annotation/processing/BeanDefinitionProcessor.javagestalt-module/src/main/java/org/terasology/gestalt/module/resources/ClasspathFileSource.javagestalt-module/src/main/java/org/terasology/gestalt/naming/Version.java
These changes are needed for Terasology to work with Gestalt DI. This is to go along with the main Terasology pull request.
It appears to do the following (although I am no longer certain of this):
!semver.preReleaseVersion().isEmpty()tosemver.preReleaseVersion().isPresent()(this may have been due to a breaking ABI change in the JSemver library)