Repository navigation
Commit 4a7ec1b
committed
Kotlin: Support compiler API changes in 2.5.0
Kotlin 2.5 removed `JvmCodegenUtil` and `IrPluginContext.moduleDescriptor`,
and `IrExternalPackageFragmentImpl` now needs an `IrModuleFragment`.
Add two compatibility functions, with the previous behaviour in v_1_8_0 and
the new one in v_2_5_0:
- getCurrentJvmModuleName, used by KotlinUsesExtractor.getJvmModuleName
for the name of the module being compiled. For 2.5 it applies the old
JvmCodegenUtil.getModuleName logic to the module fragment's descriptor.
KotlinExtractorGlobalState now holds the module fragment to support this.
- createExternalPackageFragment, used to make the synthetic
`kotlin.internal.ir` package for RawTypeAnnotation. For 2.5 it passes
IrErrorModuleFragment, as the compiler's own
JvmIrSpecialAnnotationSymbolProvider does.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38400d2f-9060-4b63-8536-73ce77bb5c91
X1 parent bdc58ee commit 4a7ec1b
7 files changed
Lines changed: 62 additions & 6 deletions
File tree
- java/kotlin-extractor/src/main/kotlin
- utils
- versions
- v_1_8_0
- v_2_5_0
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
1055 | 1054 | | |
1056 | 1055 | | |
1057 | 1056 | | |
1058 | | - | |
| 1057 | + | |
1059 | 1058 | | |
1060 | 1059 | | |
1061 | 1060 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
177 | 176 | | |
178 | 177 | | |
179 | 178 | | |
180 | | - | |
| 179 | + | |
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments