Ivan Gavrilovic
dfdd107fc0
Update KAPT stubs for tests
...
Update expected outputs so they match
the new sorting rules.
2021-01-13 22:49:09 +09:00
Ivan Gavrilovic
a320152a03
Revert "Sort class members to ensure deterministic builds"
...
This reverts commit 4bf63a9539 .
2021-01-13 22:49:09 +09:00
Hung Nguyen
4bf63a9539
Sort class members to ensure deterministic builds
...
Class methods and fields are currently sorted at serialization (see
DescriptorSerializer.sort) and at deserialization (see
DeserializedMemberScope.OptimizedImplementation#addMembers). Therefore,
the contents of the generated stub files are sorted in incremental
builds but not in clean builds.
The consequence is that the contents of the generated stub files may not
be consistent across a clean build and an incremental build, making the
build non-deterministic and dependent tasks run unnecessarily (see
KT-40882).
To work around that, this commit sorts class methods and fields when
outputting stub files.
Bug: KT-40882 (there are actually 2 issues in here; this commit fixes
the first one)
Test: New DeterministicBuildIT + Updated existing test expectation files
2020-11-25 20:51:09 +03:00
Yan Zhulanow
eb9b5da82b
Kapt: Never mark static methods 'default' (KT-42915)
2020-10-28 21:03:26 +09:00
Yan Zhulanow
9cdd6e9a8f
Kapt: Support new @JvmDefault functionality (KT-25960)
2020-09-29 23:58:30 +09:00
Yan Zhulanow
a44fd964cf
Kapt: Don't convert field initializers for enum fields inside companion objects (KT-37732)
...
For classes with companion objects, Kotlin compiler generates a 'Companion' static accessor field.
Java prioritizes fields over inner types (apparently, Scala does this as well, KT-29864), so the generated initializer doesn't compile.
As a workaround, initializer generatation is disabled for enum fields inside companion objects. Certainly, it's not a proper fix, however it does fix the regression.
2020-09-29 23:58:29 +09:00
Yan Zhulanow
62affd8e0d
Kapt: Allow to strip @Metadata annotation from stubs (KT-36667)
2020-09-29 23:58:24 +09:00
Dmitry Petrov
2e31f95554
Update testData
2020-07-20 20:04:32 +03:00
Dmitry Petrov
2137a4b1e5
JVM, JVM_IR: no nullability annotations on private and synthetic methods
...
NB it looks like it doesn't cover all cases, e.g., some synthetic
methods generated for suspend functions.
2020-06-26 18:51:35 +03:00
Dmitry Petrov
9468670980
Minor: update testData with nullability annotations
2020-06-26 15:17:23 +03:00
Dmitry Petrov
e9231b5624
JVM: Generate object and companion object INSTANCE fields as @NotNull
2020-06-22 16:28:00 +03:00
Mikhail Bogdanov
58183b774d
Fix test data
2020-06-19 15:07:36 +02:00
Yan Zhulanow
2044ece335
Kapt: Add DUMP_DEFAULT_PARAMETER_VALUES flag (KT-29355)
...
Put initializers on fields when corresponding primary constructor
parameters have a default value specified. The new behavior
is available under the new 'DUMP_DEFAULT_PARAMETER_VALUES' flag.
Note that this doesn't affect regular functions with default parameter
values, as well as primary constructor parameters without a
'val' or 'var' keyword.
2020-05-27 02:38:42 +09:00
Yan Zhulanow
60aa47553d
Kapt, minor: Move test logic for KaptFlags to the new base class
2020-05-27 02:38:42 +09:00
Dmitry Petrov
b89878a509
Update testData for KAPT tests for new inline class ABI
...
Since class member functions returning inline class values are now
mangled, they are not visible from Java.
2020-05-21 13:56:57 +03:00
Ilya Gorbunov
5eabc1117f
Generate constant expression initializers for special fp values in kapt
...
Update new constant values propagated in kapt class-to-stub test
2020-04-01 08:06:57 +03:00
Yan Zhulanow
9bf63f5399
Kapt, minor: Add extra case for property initializers
2020-01-24 18:12:21 +09:00
Kevin Bierhoff
6d32b3256b
suppress duplicate @Override annotations
2020-01-24 18:12:21 +09:00
Yan Zhulanow
520f9a6da5
Kapt: Support all kinds of constant types (KT-35536)
2020-01-20 17:39:22 +09:00
Dmitriy Novozhilov
76b3964e96
Update testdata according to change compiler version to 1.4
2020-01-17 10:33:50 +03:00
Ivan Gavrilovic
eab6864269
KT-35536: Fix enum constants in KAPT
...
Enum constants are Pair, so make sure to unpack them correctly.
2019-12-24 15:14:47 +09:00
Yan Zhulanow
6bf15b6d37
Kapt: Generate constant value initializers for mutable properties (KT-30164, KT-29355)
2019-10-24 21:33:01 +09:00
Yan Zhulanow
9edd4554a9
Kapt: Support @Deprecated annotations (KT-30368)
2019-10-24 21:33:01 +09:00
Alexander Udalov
01ddac58e1
Add language feature for changed name of property annotations method
...
#KT-31352 Fixed
2019-08-12 16:48:26 +02:00
Alexander Udalov
ea0142da60
Use JVM name of getter in synthetic method for property annotations
...
#KT-31352 In Progress
2019-08-12 16:48:25 +02:00
Alexander Udalov
ceecbfdcea
Minor, fix kapt test data on comments
...
ClassFileToSourceStubConverter relies on JvmDeclarationOrigin which is
used in the codegen, and that origin has slightly changed for the
synthetic '$annotations' method (see
`MemberCodegen.generateSyntheticAnnotationsMethod`) in e9b50157
2019-05-30 19:30:46 +02:00
Yan Zhulanow
a0778ad703
Revert "Kapt: Always use raw types for annotation parameter types (KT-30346)"
...
This reverts commit 66754e62
2019-05-23 19:09:27 +09:00
Yan Zhulanow
49d94f72d2
Revert "Kapt: Generate constant value initializers for mutable properties (KT-30164)"
...
This reverts commit cce2b472
2019-03-22 15:17:12 +03:00
Yan Zhulanow
4c794b1302
Revert "Kapt: Support default constant values for constructor parameters"
...
This reverts commit e4d758b6
2019-03-22 15:17:12 +03:00
Yan Zhulanow
c7678a27e5
Kapt: Fix star indentation in stub Javadoc (KT-30163)
2019-03-20 20:52:23 +03:00
Yan Zhulanow
e4d758b614
Kapt: Support default constant values for constructor parameters
2019-03-20 20:52:23 +03:00
Yan Zhulanow
cce2b472bf
Kapt: Generate constant value initializers for mutable properties (KT-30164)
2019-03-20 20:52:22 +03:00
Yan Zhulanow
ce13982cfc
Kapt: Use constant value references where possible in property initializers
2019-03-20 20:52:22 +03:00
Yan Zhulanow
66754e62da
Kapt: Always use raw types for annotation parameter types (KT-30346)
2019-03-20 20:52:22 +03:00
Yan Zhulanow
ea462091c4
Support new convention for local variables name mangling: '$receiver' -> '$this$<label>' (KT-26913)
2019-02-25 14:43:53 +03:00
Yan Zhulanow
1fbf51ea13
Kapt: Ignore imports for enum entries on import conversion (KT-28220)
2019-02-15 21:23:27 +03:00
Yan Zhulanow
87cad2af02
Kapt: Fix "no interface expected here" in class implementing interface with secondary constructor (KT-27506)
2019-02-15 21:23:27 +03:00
Yan Zhulanow
1c824655d4
Kapt: Fix supertype conversion for DefaultImpls (KT-28306)
2019-02-15 21:23:26 +03:00
Yan Zhulanow
a090541108
Kapt: Update test data (stub converter tests)
2018-12-12 21:40:44 +09:00
Yan Zhulanow
47657df8da
Kapt: Convert valid references to qualified names (KT-26304)
2018-11-27 22:21:27 +09:00
Yan Zhulanow
6a8a8b794d
Kapt: Support correctErrorTypes in suspend functions (KT-27711)
2018-11-27 22:21:27 +09:00
Yan Zhulanow
4c5e982f3e
Kapt: Fix an ArrayIndexOutOfBoundsException for suspend functions with generated return types
2018-11-27 22:21:26 +09:00
Yan Zhulanow
69633e6686
Kapt: Fix stubs for delegated properties with anonymous types (KT-27910)
2018-11-27 22:21:26 +09:00
Yan Zhulanow
7626cf6611
Minor: Update test data for kapt stub converter
2018-10-24 23:44:31 +03:00
Yan Zhulanow
1f6dbc74da
Kapt: Restore constant identifiers for field annotations (KT-27334)
...
The old behavior broke after the refactoring of annotations with use-site targets.
2018-10-24 20:12:37 +03:00
Yan Zhulanow
6d017f07ad
Kapt: Support androidx.annotation.RecentlyNullable annotations (KT-26725)
2018-10-24 20:12:35 +03:00
Yan Zhulanow
ac1dd59472
Kapt: Fix anonymous type transformer, do not use ClassDescriptor.defaultType as a replacement (KT-27119)
2018-10-24 20:12:34 +03:00
Yan Zhulanow
39863edd0e
Kapt: Use correct type mapping mode while mapping super types (KT-27126)
2018-10-24 20:12:32 +03:00
Yan Zhulanow
f6bf35c1f5
Kapt: Fix error type correction for super class constructor calls
2018-10-24 20:12:31 +03:00
Yan Zhulanow
5d2a3c097c
Minor: Update kapt test (nullability annotation is gone in Enum constructors)
2018-10-22 23:06:05 +03:00