Skip to content
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

[WIP] Experiment - Update to Kotlin 1.9.20-Beta2 #36

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

apatrida
Copy link

This PR is not meant to be merged, it is meant to be informational to see what the current state is for Arrow-Meta and latest Kotlin compilers.

Experiment to see the difference for upgrading to current Kotlin compiler from 1.9.20-Beta2.

** INCOMPLETE, FAILING TESTS DUE TO ASSERT FAILING IN COMPILER **

notes:

  • rename FirArrayOfCall to FirArrayLiteral (confirmed in Kotlin compiler history)
  • rename FirQualifiedAccess to FirQualifiedAccessExpression (confirmed in Kotlin compiler history)
  • convertToIrAndActualize no longer returns Fir2IrResult but instead Fir2IrActualizedResult
  • convertToIrAndActualize now has a complicated default method requiring more configured items, but there is a helper convertToIrAndActualizeForJvm used here for simplicity (for supporting other target platforms we would need to configure for each?) This also requires a diagnostics reporter, not sure if I handled that correctly or not.
  • In the configuration for convertToIrAndActualize note the TOOD for the flag allowNonCachedDeclarations
  • testing needs to configure a FIR parser configureFirParser(FirParser.LightTree) (or Psi)

@what-the-diff
Copy link

what-the-diff bot commented Sep 26, 2023

PR Summary

  • Updates to Function Parameters
    The pull request modifies various functions' inputs in the arrow-reflect-annotations module. It thus aligns these changes with the current system requirements, ensuring that these code parts work optimally.

  • Change in Type Definition
    In TemplateCompiler.kt, the Fir2IrResult type has been replaced with Fir2IrActualizedResult. This change in the TemplateResult class aims to more accurately represent the data it will hold, leading to better clarity and reduced potential errors.

  • Introduction of Additional Parameters
    The convertToIRfunction has been provided with an extra parameter metaCheckerContext that aids in reporting diagnostics. This feature may contribute to better error reporting, and thus improve developer productivity by helping to locate and figure out issues faster. In the same context, more parameters have been introduced in functions of the FirMetaCodegenExtension.kt file.

  • Using Fir2IrConfiguration for Function Configurations
    This update favors the convertToIR function as it employs the Fir2IrConfiguration class during the conversion process. The application of this configuration renders improved flexibility and customization options for conversions.

  • Adoption of FirParser.LightTree in configureFirParser Function Calls
    The configureFirParser function, present in different files, now uses FirParser.LightTree. This change aims to provide more efficient parsing services by utilizing the LightTree parser, which is known for its memory efficient utility and robust parsing.

  • Extension of RuntimeClasspathProvider by MetaRuntimeClasspathProvider
    The configureFirParser function, present in different files, now uses FirParser.LightTree. This change aims to provide more efficient parsing services by utilizing the LightTree parser, which is known for its memory efficient utility and robust parsing.

  • Update of Kotlin Version
    The Kotlin version used in the sandbox is now updated to "1.9.20-Beta2". This enhancement ensures that the project benefits from the most recent features and improvements of Kotlin, leading to optimized performances and enhanced security.

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.

None yet

1 participant