Skip to content

Cleanup of deprecated code and features #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

Mr3zee
Copy link
Collaborator

@Mr3zee Mr3zee commented Jun 6, 2025

Strict mode Migration
A series of changes to simplify kRPC protocol

  • Remove fields support
  • Remove stream scopes
  • Simplify lifetime management
  • Cold RPC clients creation
  • Deprecated declarations cleanup
  • Documentation update for previous changes

Subsystem
All, mostly kRPC

Problem Description
A lot of deprecated code is left out after the previous changes

Solution
Cleanup!

@Mr3zee Mr3zee self-assigned this Jun 6, 2025
@Mr3zee Mr3zee added breaking Contains breaking changes deprecation Contains derecations labels Jun 6, 2025
@Mr3zee Mr3zee marked this pull request as ready for review June 10, 2025 14:49
@Mr3zee Mr3zee requested a review from e5l June 10, 2025 14:49
@e5l e5l requested a review from Copilot June 11, 2025 07:52
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 cleans up deprecated code and features for the kRPC protocol. It removes unused APIs and strict mode functionality, refactors strict mode diagnostics into new objects, and removes deprecated CLI options and redundant functions.

  • Removed deprecated functions and classes in the core API.
  • Refactored strict mode diagnostics and checkers in the compiler plugin.
  • Removed deprecated CLI options and API endpoints no longer in use.

Reviewed Changes

Copilot reviewed 60 out of 60 changed files in this pull request and generated no comments.

Show a summary per file
File Description
core/api/core.api Removed deprecated utility classes and functions no longer used in kRPC.
compiler-plugin/compiler-plugin-k2/src/main/v_2_2_2/kotlinx/rpc/codegen/checkers/FirRpcCheckersVS.kt Removed outdated strict mode expression checker for stream scopes.
compiler-plugin/compiler-plugin-k2/.../diagnostics/DiagnosticFactories.kt (various) Removed legacy diagnostic factories and related strict mode support.
compiler-plugin/compiler-plugin-k2/src/main/latest/kotlinx/rpc/codegen/checkers/FirRpcCheckersVS.kt Simplified strict mode class checker by removing the unnecessary context parameter.
compiler-plugin/compiler-plugin-core/.../RpcDiagnosticRendererFactory.kt Refactored strict mode diagnostic mapping into an object using the new API.
compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/StrictMode.kt Removed the strict mode configuration file and related code.
compiler-plugin/compiler-plugin-backend/.../RpcStubGenerator.kt Removed the deprecated getFields function from stub generation.
compiler-plugin/compiler-plugin-backend/.../RpcIrContext.kt Removed unused IR symbols no longer required after deprecation
Comments suppressed due to low confidence (3)

compiler-plugin/compiler-plugin-cli/src/main/latest/kotlinx/rpc/codegen/RpcCompilerPlugin.kt:18

  • Deprecated strict mode CLI options have been removed from pluginOptions. Please update the accompanying documentation to guide users on the new configuration approach.
StrictModeCliOptions.STATE_FLOW, StrictModeCliOptions.SHARED_FLOW, StrictModeCliOptions.NESTED_FLOW, StrictModeCliOptions.STREAM_SCOPED_FUNCTIONS, StrictModeCliOptions.SUSPENDING_SERVER_STREAMING, StrictModeCliOptions.NOT_TOP_LEVEL_SERVER_FLOW, StrictModeCliOptions.FIELDS,

compiler-plugin/compiler-plugin-backend/src/main/core/kotlinx/rpc/codegen/extension/RpcStubGenerator.kt:617

  • The generateGetFieldsFunction call has been removed. Ensure that all consumers relying on this API are updated to use the new mechanism or removed accordingly.
generateGetFieldsFunction()

compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/StrictMode.kt:1

  • The removal of StrictMode.kt requires verifying that all configuration processes and strict mode handling in the compiler plugin have been updated to use the new diagnostics system.
Entire file removed

@Mr3zee Mr3zee force-pushed the deprecations-cleanup branch from 17d8c5c to fbd4c6e Compare June 11, 2025 08:58
Base automatically changed from cold-client to enforce-strict-mode June 12, 2025 09:06
@Mr3zee Mr3zee force-pushed the deprecations-cleanup branch from fbd4c6e to 3b32e1e Compare June 12, 2025 09:08
@Mr3zee Mr3zee merged commit 3b73540 into enforce-strict-mode Jun 12, 2025
1 check passed
@Mr3zee Mr3zee deleted the deprecations-cleanup branch June 12, 2025 09:09
Mr3zee added a commit that referenced this pull request Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Contains breaking changes deprecation Contains derecations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants