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
Dmitriy Novozhilov
e933c7b6d9
[Build] Remove testApi(intellijDep()) dependencies from all modules
...
Since IDEA moved most of it's jars to java 11 it's illegal to use them
in our dependencies, so all modules which use `intellijDep()` should
carefully specify which jars they use
2021-09-30 14:41:31 +03:00
Vyacheslav Gerasimov
ab146bd6d4
Build: Fix deprecated Gradle configurations usages
...
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Nikolay Krasko
47a660e479
Fix publication for jvm-abi-gen
...
Effectively solved by rearranging order of lines - runtimeJar() should
be used after publish(). Otherwise, jar task is not registered as
dependency for publication, and publication misses the main jar.
#KTI-637 Fixed
2021-09-08 22:28:53 +03:00
Steven Schäfer
fc6c2c9631
jvm-abi-gen: Reformat files and add comments
2021-08-23 18:25:33 +02:00
Steven Schäfer
023db4f376
jvm-abi-gen: Use the configured MessageCollector to write ABI jars
2021-08-23 18:25:33 +02:00
Steven Schäfer
6d518c8e57
JVM IR: Mark annotation implementation classes as anonymous
...
And add tests to ensure that annotation implementation classes are
handled correctly in jvm-abi-gen.
2021-08-23 18:25:33 +02:00
Steven Schäfer
19660f11a7
jvm-abi-gen: Remove WhenMapping classes from ABI if possible
2021-08-23 18:25:33 +02:00
Steven Schäfer
ec4d7b2bb6
jvm-abi-gen: Add tests for uses of private Kotlin classes from Java
2021-08-23 18:25:33 +02:00
Steven Schäfer
6756420725
jvm-abi-gen: Add tests for KT-40133 and KT-40340
2021-08-23 18:25:33 +02:00
Steven Schäfer
5059513106
jvm-abi-gen: Strip inline functions in private classes
...
Inline functions in private classes can only be accessed from Java and
we do not need to preserve their bodies for the abi.
2021-08-23 18:25:33 +02:00
Steven Schäfer
3ffe495346
jvm-abi-gen: Mark all anonymous objects in inline function scope as public
...
Anonymous objects inside of a private inline function nested in a public
inline function can still escape.
2021-08-23 18:25:33 +02:00
Steven Schäfer
d94817cfb6
jvm-abi-gen: Don't strip nested classes from the Kotlin Metadata
2021-08-23 18:25:33 +02:00
Steven Schäfer
4a59af3b8b
jvm-abi-gen: Update metadata version if needed
2021-08-23 18:25:33 +02:00
Steven Schäfer
c156613141
jvm-abi-gen: always keep annotation classes
2021-08-23 18:25:33 +02:00
Steven Schäfer
8efb955ab5
JVM: Add more tests to jvm-abi-gen
2021-08-23 18:25:33 +02:00
Steven Schäfer
d08990ebb4
JVM: New single-pass implementation for jvm-abi-gen
2021-08-23 18:25:33 +02:00
Vyacheslav Gerasimov
58f1fb644f
Build: Stop publishing jars with original classifier
...
#KTI-580
2021-06-17 19:43:10 +03:00
Dmitriy Novozhilov
c6039d76d3
Enforce using old backend in JvmAbiAnalysisHandlerExtension
2021-01-28 13:19:27 +03:00
Alexander Udalov
ed9a0e514d
Regenerate tests and fir-tree
2021-01-03 14:53:41 +01:00
Dmitriy Novozhilov
bc7e18fb8a
[TEST] Regenerate tests after previous commit
2020-12-16 19:52:28 +03:00
Ilya Gorbunov
b2b2629e79
Use new kotlin.io.path API in tests
2020-11-20 09:03:25 +03:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00
Dmitry Petrov
89a0b3e944
Check class source in bytecode listing tests
2020-07-27 19:13:37 +03:00
Dmitry Petrov
0741781462
Compare inner class access flags in bytecode listing tests
2020-07-23 19:13:28 +03:00
Dmitry Petrov
e9231b5624
JVM: Generate object and companion object INSTANCE fields as @NotNull
2020-06-22 16:28:00 +03:00
Ilya Chernikov
5e33612238
Extract interface from CompilerMessageLocation to ease extension
...
The CompilerMessageLocation is an implicit part of the binary daemon
protocol so changing it breaks compatibility with older daemons.
This change allows to extend location for non-daemon uses without
breaking the binary protocol.
2020-06-05 21:58:27 +02:00
Alexander Udalov
8a4510c21b
Regenerate tests
2020-01-02 10:31:00 +01:00
Dmitriy Novozhilov
e7f8c8e155
[TEST] Regenerate tests after previous commit
2019-12-12 16:11:45 +03:00
Alexander Udalov
fd627603a0
Refactor CompilationErrorHandler
...
It only had one implementation THROW_EXCEPTION, inline it everywhere
with a call to a static method
2019-12-03 10:48:34 +01:00
Kevin Bierhoff
0285b26e40
make FunctionCodegen skip method bodies we don't need, which avoids problems with inlining methods inside methods we don't need
...
KT-33604
2019-11-22 12:54:42 +03:00