Support Kotlin 2.3.0#18
Open
sky130 wants to merge 15 commits into
Open
Conversation
* Update Kotlin to 2.3.0 * Update Gradle to 9.0 * Update MavenDeployer to 0.18.0 * Update Shadow to 9.4.1
* Update IR element accessors to use `arguments`, `typeArguments`, and `parameters` instead of deprecated `valueParameters`, `putValueArgument`, etc. * Support `IrParameterKind` for filtering extension, regular, and context parameters. * Update `IrConst` usage to use type-safe value access. * Replace `IrElementVisitorVoid` with `IrVisitorVoid`. * Fix `capitalize` deprecations in Gradle plugin and compiler. * Improve IR building logic for lambdas and constructor calls to match new compiler requirements. * Update `KneeLogger` to use `InternalSymbolFinderAPI` for finding standard library functions. * Refactor `UnpackageCodegenSources` task to be an abstract class.
* Update KneeComponentRegistrar to include pluginId * Fix parameter mapping in UpwardFunctions to use resolved codec types * Cleanup unused imports in ImportInfo.kt
* Set backing field visibility to private in IrUtils * Update KneeComponentRegistrar constructor and pluginId * Fix argument indexing in initKnee transformation * Add more descriptive error message for vararg element extraction
Author
* Handle IrClass in addition to IrFile when determining package name * Improve error handling for unexpected declaration parents
* Remove `@JvmStatic` annotation from JNI private functions as they are not necessarily members of named or companion objects * Minor whitespace cleanup
* Support type arguments in `ParameterizedTypeName.disambiguationName` * Update `CodegenFunction` UID logic
* Implement `containerForDeclaration` to build a `CodegenDeclaration` hierarchy * Refactor `KneeInterface` to use the new container resolution logic * Support companion object and property accessor detection during container generation
…ler plugin * Introduce `ensureContainer` in `KneeCodegen` to safely resolve or prepare declaration containers. * Update `KneeLogger` to use `CallableId` and `FqName` for finding `println` functions, improving compatibility with IR symbol finder APIs. * Refactor parameter mapping in `UpwardFunctions` to use name-based lookup and improve type substitution logic. * Enhance `KneeCodegen` IR preparation to handle constructor logic in file-level containers and improve code formatting. * Standardize container acquisition across classes, interfaces, objects, properties, and functions using the new `ensureContainer` helper.
* Update Kotlin to 2.3.0 across test modules * Update Android Gradle Plugin to 8.13.0 across test modules * Add `@KneeClass` and `@Knee` annotations to `Outer` class and `Inner.value` property in `test-interfaces` definitions
- fix parameter mapping for imported suspend interface members - fix reverse FlowCollector.emit invocation on JVM - fix method(key) lookup in generated interface wrappers - improve JNI wrapper reference lifecycle for imported interfaces - add regression tests for direct StateFlow access
- bind downward member-call arguments by actual IR parameter slots instead of filtered regular-parameter indexes - fix imported interface adapters to use the same slot mapping - prevent @kneeclass member calls like getString(key, default) from dropping the trailing argument at runtime - fix native exception rethrow bridging to pass both env and throwable - add regression coverage for class members with multiple parameters
Fix generated IR for collection helpers such as encodeArray, decodeIntoArray, encodeList and decodeIntoList by assigning the JniEnvironment extension receiver and collection argument to their actual parameter slots. This prevents Kotlin/Native IrLinkageError crashes where encodeArray or decodeIntoArray is called without the array parameter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.