Leonid Startsev
283f816320
Use source-version of kotlinx-metadata-jvm for embedding
...
Embedding published version while using source one can lead to runtime errors like NoClassDefFound
if a new (not yet published) declaration was used in implementation.
2023-06-27 15:12:46 +00:00
Leonid Startsev
b15da7c63a
Deprecate old kotlinx-metadata flags API:
...
Flag, Flag constants, Flags typealias, flagsOf() function, and
Flag accessors in nodes (such as KmClass.flags, KmClass.jvmFlags, KmProperty.setterFlags, etc)
#KT-59440
2023-06-27 15:12:46 +00:00
Alexander Udalov
ecc1f9fb0b
Update to kotlinx-metadata-jvm 0.6.2
...
Migrate to the new API in kotlin-reflect build script, remove obsolete
workarounds.
2023-06-27 14:32:15 +00:00
Alexander Udalov
5451477eb0
Minor, remove useLegacyAbiGen test mode
...
Legacy jvm-abi-gen was removed in KT-55375.
2023-06-27 14:32:15 +00:00
Alexander Udalov
4ac6f01d31
Add ReplaceWithSupertypeAnonymousTypeTransformer to light analysis tests
...
To make these tests behave closer to kapt, since kapt is the primary use
case for the light analysis mode.
AbstractLightAnalysisModeTest compares the text dump of bytecode
obtained with full analysis and light analysis, removing things like
anonymous/synthetic entities. In the light analysis mode anonymous
objects in supertypes are always approximated, and in the full analysis
mode they are always present as is in signatures. So we're transforming
the text dump in the same way, by approximating anonymous objects in
signatures (more precisely, in return types of methods and fields) to
the supertype.
2023-06-22 17:10:51 +02:00
Sebastian Sellmair
5d0bf2de24
[CLI] Restore K2JVMCompilerArguments.classpath and javaModulePath
...
to support IDEs < 2023.2
Reverts:
- 9dcd40d7b7
- fb66764c4d
KTIJ-25227
2023-04-18 09:18:10 +00:00
Sebastian Sellmair
9dcd40d7b7
[CLI] K2JVMCompilerArguments: Model classpath as Array<String>
...
to allow interning individual file-path arguments on the IDE
KTIJ-24976
2023-04-06 16:03:03 +00:00
Alexander Udalov
f4b4922a13
Use new ClassGeneratorExtension EP in jvm-abi-gen
2023-03-13 13:53:07 +01:00
Alexander Udalov
9f269b83aa
Remove "legacy" mode of jvm-abi-gen plugin
...
#KT-55375 Fixed
2023-03-10 12:24:50 +00:00
Pavel Mikhailovskii
4c7f8ba196
KT-56457 Annotate Enum.entries with @NotNull
2023-02-09 20:13:56 +00:00
Dmitriy Novozhilov
88efa6bfb6
Update tests after switching to LV 1.9
2023-01-30 09:29:57 +00:00
Alexander Udalov
ef208d9eac
Throw if kotlinx-metadata-jvm version in jvm-abi-gen is too low
2023-01-25 23:24:05 +01:00
Alexander Likhachev
87db928b2d
[IC] Support precise output backup for jvm-abi-gen plugin
...
#KT-49785 In Progress
2023-01-17 22:15:53 +00:00
Alexander Udalov
3197a118ab
Update jvm-abi-gen to kotlinx-metadata-jvm's Km* node API
2023-01-17 22:00:30 +01:00
Alexander Udalov
5ef372aab5
Update jvm-abi-gen to kotlinx-metadata-jvm 0.6.0
2023-01-17 21:59:54 +01:00
Mikhail Glukhikh
0c4a0360ac
Deserialization/class reading: pass chosen JvmMetadataVersion whenever possible
2023-01-16 18:16:07 +01:00
Vyacheslav Gerasimov
1fa7c7119b
Build: Fix caching of some ShadowJar tasks in the project
...
To be cacheable relocated shadow jars should not include manifest with
build number. Instead, we repack relocated shadow jar in default jar
task with proper manifest.
2023-01-04 16:31:48 +00:00
Alexander Udalov
3c4b5529af
Update year to 2023 in COPYRIGHT_HEADER.txt
...
This commit is the result of changing the year to 2023 in
COPYRIGHT_HEADER.txt and running all `generate*` tasks in
`generators/build.gradle.kts`.
2023-01-02 22:52:15 +01:00
Alexander Udalov
b4ffa56ea4
Deprecate legacy mode of jvm-abi-gen
...
#KT-54756 Fixed
2022-12-28 21:06:34 +00:00
pyos
34a49b3f56
jvm-abi-gen: only keep relevant InnerClasses from current module
...
If a class is not referenced by the ABI class file, its InnerClasses
entry should only be kept if it's the current class or a descendant
of the current class.
2022-12-28 14:42:33 +01:00
pyos
d6fdd6734e
jvm-abi-gen: sort inner classes
2022-12-28 14:42:33 +01:00
pyos
26a7ac6d92
jvm-abi-gen: keep InnerClass attributes for all referenced types
...
^KT-55233 Fixed
2022-12-28 14:42:33 +01:00
Alexander Udalov
0d8d91f803
Remove unsafe cast function usages from compiler plugins
2022-12-06 19:44:56 +00:00
Alexander Udalov
beb3759f5a
Add jvm-abi-gen test on inline class with private ctor
...
KT-54897
2022-11-11 16:28:37 +00:00
Leonid Startsev
474ef921d8
Use standard @Deprecated in place of special opt-in annotation
...
Remove @DeprecatedVisitor
2022-11-10 13:30:10 +00:00
Leonid Startsev
471882b743
Introduce @DeprecatedVisitor; mark up visitor-related declarations with it.
...
Provide convenient JVM writing API.
Get rid of ExperimentalUnsignedTypes.
2022-11-10 13:30:09 +00:00
pyos
a30d19b655
jvm-abi-gen: consider private type aliases to be public API
...
They can be referenced from public declarations right now.
^KT-54500 Fixed
2022-10-31 22:13:21 +01:00
Alexander Udalov
97f63d539c
Remove tests on jvm-abi-gen with old JVM backend
...
#KT-48532 Fixed
2022-09-16 00:16:31 +02:00
Vladimir Sukharev
c8864369fd
Use main class as test generator name
...
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2022-09-09 12:51:18 +00:00
Alexander Udalov
e83819e682
Minor, remove obsolete directives from jvm-abi-gen tests
...
Language version 1.6 was needed in these tests to enable annotation
instantiation, but that feature is now enabled by default.
2022-09-09 14:32:36 +02:00
Alexander Udalov
6e1cddd039
Disable @SourceDebugExtension generation in jvm-abi-gen tests
...
In these two tests, contents of the annotation differ by design, and
that does not constitute a difference in ABI.
2022-09-09 14:32:35 +02:00
Alexander Udalov
7dad47cd76
Add -X argument to disable generation of @SourceDebugExtension
...
This will be used in tests in the subsequent commit.
2022-09-09 14:32:35 +02:00
Pavel Mikhailovskii
18e61315f4
KT-27936 Generate InnerClasses attributes
2022-08-23 22:06:10 +00:00
Dmitry Gridin
4ceb170917
regenerate tests
2022-08-05 14:12:41 +02:00
Dmitriy Novozhilov
1a8496757e
[Compiler] Mark all entrypoints to compiler API as experimental
2022-06-29 12:00:01 +00:00
Dmitriy Novozhilov
8b42638afa
[Plugins] Introduce new API for registering compiler plugins
...
Original `ComponentRegistrar` exposes Project to its registration method,
so plugins should manually register extensions to it. To prepare for
possible unbound compiler from Project API in future new `K2ComponentRegistrar`
introduced which provides registration method without Project at all
2022-06-29 11:59:58 +00:00
Dmitriy Novozhilov
b23092b447
jvm-abi-gen: report compilation errors instead of throwing exceptions during configuration
2022-06-10 09:47:35 +03:00
pyos
60405237d2
jvm-abi-gen: mark as supporting K2 (in new mode)
2022-06-10 09:44:31 +03:00
Yahor Berdnikau
e25778a719
Fix ConcurrentModificationException
...
This exception is happening on build configuration trying to remove
default jar task artifacts from published one. I've set 'jar' task
to be always disabled instead and just add shadow jar to artifacts.
2022-05-24 07:58:36 +00:00
Ilya Chernikov
2044754628
Backend: remove psi files from generation state
...
pass them explicitly to all destinations. This is a step in attempt to
abstract dependencies on PSI in the GenerationState and related places.
2022-03-30 08:33:59 +00:00
Ilya Chernikov
da41fddabb
Backend: remove codegen factory from generation state
...
use it explicitly. This is a step in attempt to abstract dependencies
on PSI in the GenerationState and related places.
2022-03-30 08:33:51 +00:00
Steven Schäfer
78d80181e2
inlineClassUtils: Fix handling of inline classes without constructors
...
Fixes KT-50992
DeclarationDescriptor.isInlineClass misidentifies inline classes without
constructors. This can happen for the ABI of inline classes with private
constructors.
2022-02-04 23:30:24 +01:00
Vyacheslav Gerasimov
f7a9065b75
Build: Use intellij maven repo instead of downloaded IDEA
...
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov
049066f8ac
Replace systemIndependentPath from Idea with invariantSeparatorsPath
2021-12-16 21:48:21 +03:00
Vyacheslav Gerasimov
bc2f0936bd
Build: Rename commonDep -> commonDependency
2021-12-16 21:48:19 +03:00
Steven Schäfer
3f22321643
jvm-abi-gen: Do not write kotlin.Metadata default values
...
See KT-39492. This does not affect compilation, but it causes problems
in IntelliJ.
2021-12-16 16:11:32 +01:00
Steven Schäfer
a5fa69b8ee
jvm-abi-gen: use kotlinx-metadata 0.4.0 from maven
...
(cherry picked from commit f5e95444f82bb8e4be72dcef18da3a92277911e0)
2021-12-02 01:41:57 +01:00
Steven Schäfer
05695761ec
jvm-abi-gen: Add test to check the declaration order in interface jars
2021-12-01 19:20:47 +01:00
Steven Schäfer
b8625cd233
jvm-abi-gen: Do not sort stripped methods and fields
...
The order is visible to annotation processors and should be considered
part of the ABI of a class.
2021-12-01 19:20:47 +01:00
Alexander Udalov
aa247726b6
Prohibit using old JVM backend with LV >= 1.6
...
#KT-48928 Fixed
2021-09-30 13:56:34 +02:00