Skip to content

Fix Kotlin 2.3.0 compatibility issues#681

Closed
runningcode wants to merge 3 commits intomainfrom
no/kotlin-2-3-0-compatibility
Closed

Fix Kotlin 2.3.0 compatibility issues#681
runningcode wants to merge 3 commits intomainfrom
no/kotlin-2-3-0-compatibility

Conversation

@runningcode
Copy link
Contributor

@runningcode runningcode commented Jan 7, 2026

  • Fixes compilation errors when building against HN
  • Replaces deprecated ValueSourceParameters.None with custom EmptyParameters interface
  • Adds explicit Any? bound to PropertyUtils.orEmpty() function

runningcode and others added 3 commits January 7, 2026 17:56
Kotlin 2.3.0 introduced stricter type parameter bounds checking. The
`ValueSourceParameters.None` type is no longer valid as a type parameter
bound because it doesn't satisfy the `Any` constraint.

Changes:
- Define EmptyParameters interface extending ValueSourceParameters
- Update all ValueSource implementations to use EmptyParameters instead of None
- Add explicit Any? bound to PropertyUtils.orEmpty() function

This fixes compilation errors related to type parameter bounds and
projection restrictions in Kotlin 2.3.0.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Kotlin 2.3.0 requires type parameters to be subtypes of Any, and
String? (nullable) is not a subtype of Any. Changed all ValueSource
implementations to return non-nullable String instead, using the
elvis operator to return empty string for null values.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Kotlin 2.3.0 requires type parameters to be subtypes of Any.
Added explicit Any bound to the orEmpty function's type parameter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@emerge-tools
Copy link

emerge-tools bot commented Jan 7, 2026

📸 Snapshot Test

243 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
Emerge snapshots sample
com.emergetools.snapshots.sample.debug
0 0 0 0 159 1 N/A
Hacker News
com.emergetools.hackernews.debug
0 0 0 0 84 0 N/A

🛸 Powered by Emerge Tools

if (gitHub.isSupportedGitHubEvent()) {
gitHub.sha()?.let { sha = it }
return if (gitHub.isSupportedGitHubEvent()) {
gitHub.sha() ?: ""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

At first, I couldn't figure out how to re-use the orEmpty() function here and have it compile in the integration test. I will give it another pass tomorrow or in another PR.

@runningcode runningcode marked this pull request as ready for review January 7, 2026 17:27
@runningcode runningcode requested review from chromy and removed request for chromy January 8, 2026 08:11
@runningcode runningcode closed this Jan 8, 2026
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.

1 participant