Skip to content

Conversation

ForteScarlet
Copy link
Owner

No description provided.

# Conflicts:
#	buildSrc/src/main/kotlin/IProject.kt
#	gradle/libs.versions.toml
#	kotlin-js-store/wasm/yarn.lock
#	kotlin-js-store/yarn.lock
- Bumped `ktVersion` to `2.2.20` and updated related configurations in `IProject.kt` and `libs.versions.toml`.
- Updated `yarn.lock` with multiple dependency upgrades, including `chokidar`, `mocha`, `webpack`, and more.
- Adjusted Kotlin FIR and IR transformations for improved type handling and code quality.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR releases version v2.2.20-0.13.1, updating the project from Kotlin 2.2.10 to 2.2.20. The release includes compatibility updates for the new Kotlin version and improves plugin configuration management.

  • Updated Kotlin version from 2.2.10 to 2.2.20 across all configuration files
  • Enhanced FIR transformer with improved parameter handling and type system fixes
  • Added documentation improvements with version tracking information and announcement banners

Reviewed Changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/build.gradle.kts Updated suspend-transform plugin version to match release
plugins/suspend-transform-plugin-gradle/build.gradle.kts Reorganized plugin configuration and removed unused imports
gradle/libs.versions.toml Updated Kotlin version reference to 2.2.20
docs/src/version.json Updated version reference for documentation
docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/installation.md Added Chinese version tracking documentation
docs/docusaurus.config.ts Enhanced site configuration with announcement banners
docs/docs/installation.md Added English version tracking documentation
compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformTransformer.kt Fixed source location parameter naming for Kotlin 2.2.20 compatibility
compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt Multiple FIR transformer improvements including parameter handling and type system fixes
compiler/suspend-transform-plugin/build.gradle.kts Added context parameters compiler flag
buildSrc/src/main/kotlin/IProject.kt Updated project Kotlin version to 2.2.20
.changelog/v2.2.20-Beta1-0.13.1.md Added changelog entry for Beta1 version
.changelog/v2.2.20-0.13.1.md Added changelog entry for release version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

return map { vp ->
buildValueParameterCopy(vp) {
symbol = FirValueParameterSymbol(vp.symbol.name)
symbol = FirValueParameterSymbol()
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

Removing the name parameter from FirValueParameterSymbol() constructor may cause issues with parameter identification. The original code FirValueParameterSymbol(vp.symbol.name) preserved parameter naming which could be important for debugging and reflection.

Suggested change
symbol = FirValueParameterSymbol()
symbol = FirValueParameterSymbol(vp.symbol.name)

Copilot uses AI. Check for mistakes.

Copy link
Owner Author

Choose a reason for hiding this comment

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

copyAnnotations(original, funData)

val pSymbol = FirPropertySymbol(callableId)
val pSymbol = FirRegularPropertySymbol(callableId)
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

Changed from FirPropertySymbol to FirRegularPropertySymbol. Ensure this change is compatible with the property generation requirements and doesn't break synthetic property creation.

Suggested change
val pSymbol = FirRegularPropertySymbol(callableId)
// Use FirPropertySymbol to allow for synthetic property creation if needed.
val pSymbol: FirPropertySymbol = FirRegularPropertySymbol(callableId)

Copilot uses AI. Check for mistakes.

Comment on lines +839 to +840
with(checkContext) {
func.processOverriddenFunctionsSafe processOverridden@{ overriddenFunction ->
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

The massive simplification of the override checking logic removes important validation steps. The original code verified receiver types, parameter counts, and parameter types before determining override status. This simplified version may incorrectly mark functions as overrides.

Copilot uses AI. Check for mistakes.

}
.filter { !it.isFinal }
.filter { it.callableId.callableName == functionName }
.filter { it.callableId?.callableName == functionName }
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

Added null-safe operator ?. to callableId access. While this prevents null pointer exceptions, it may hide underlying issues where callableId should not be null. Consider investigating why callableId might be null and handle it more explicitly.

Suggested change
.filter { it.callableId?.callableName == functionName }
.filter {
val callableId = it.callableId
requireNotNull(callableId) { "Property symbol ${it} has null callableId, which should not happen." }
callableId.callableName == functionName
}

Copilot uses AI. Check for mistakes.

@ForteScarlet ForteScarlet merged commit 95e03a9 into master Sep 12, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant