【问题标题】:Try to find KotlinToJVMBytecodeCompiler.compileScript method in Kotlin 1.4.10尝试在 Kotlin 1.4.10 中找到 KotlinToJVMBytecodeCompiler.compileScript 方法
【发布时间】:2020-10-21 11:43:50
【问题描述】:

在将我的 java 项目从 Kotlin 1.2 迁移到 1.4 期间,我遇到了一个问题,即 v 1.4 中没有 KotlinToJVMBytecodeCompiler.compileScript() 之类的方法

Class<?> script = requireNonNull(KotlinToJVMBytecodeCompiler.INSTANCE.compileScript(environment, getClass().getClassLoader()), () -> file + " compilation failed");

请建议我应该用什么替换它?

谢谢!

【问题讨论】:

    标签: kotlin kotlin-script


    【解决方案1】:

    我能够在 github https://github.com/JetBrains/kotlin/commit/d863dc04e60ce82a162dbc4b5f1c9d379806177a#diff-36340d5f4473fd26b6fd3d39ac22b10560a53da22b65c763ba0b9e4d9864a18e 上找到这个删除提交

    那么也许你可以看到将代码迁移到新版本需要做什么,如果没有,那么可能会在 github 上提出一个问题,即这个公共函数已被删除,而没有任何关于如何迁移到新版本的信息

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-18
      • 1970-01-01
      • 1970-01-01
      • 2019-02-01
      • 2021-10-26
      相关资源
      最近更新 更多