Dmitriy Novozhilov
125b773205
[FIR] Introduce utility for creating ConeClassLikeLookupTagImpl from ClassId
...
`classId.toLookupTag()` looks much cleaner than `ConeClassLikeLookupTagImpl(classId)`
2023-02-02 08:24:48 +00:00
Anna Kozlova
48b1456290
[CLI] create ArgumentParseErrors instances on request
...
spare memory for projects with big number of modules
currently 500kb for IJ monorepo of mostly empty errors
2023-01-31 16:08:23 +00:00
Alexander Udalov
2849e45111
Kapt tests: change _ir.txt to .ir.txt
...
To be consistent with test data of other compiler tests.
2023-01-31 13:49:44 +00:00
Kirill Rakhman
63a908cff8
FIR, Assign plugin: Update for KT-54648
2023-01-31 08:39:43 +00:00
Dmitriy Novozhilov
36bb418049
[Parcelize] Add test for KT-47074
2023-01-31 07:53:08 +00:00
Leonid Startsev
26330133ab
Support intrinsifying of serializer() function when it is seen inside multifile class part
...
It's needed to be able to correctly compile kotlinx-serialization-core itself,
as compiler sees real function, not one from a facade.
#KT-56244 Fixed
2023-01-30 10:49:46 +00:00
Dmitriy Novozhilov
88efa6bfb6
Update tests after switching to LV 1.9
2023-01-30 09:29:57 +00:00
Alexander Udalov
4b0d878873
Change KaptFlag.USE_JVM_IR default value to true
...
According to the comment on `Kapt3GradleSubplugin.BooleanOption` and the
change in a7b1bade85 .
#KT-53135
2023-01-26 12:07:19 +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
Ivan Kochurkin
5f1ed56554
[FIR] Extract createFirLibraryListAndSession to cliCompilerUtils
...
Use it in compilerPipeline and FirKotlinToJvmBytecodeCompiler
2023-01-24 15:27:13 +00:00
Ivan Kochurkin
c103da98dd
[FIR] Add missing dependencies to :compiler:fir:checkers:checkers.native
2023-01-24 15:27:12 +00:00
Nikolay Krasko
4f69f61ef7
Advance version of kotlinx serialization in imports-dumper
...
File separator are not escaped now, as there's no need to escape /
character in JSON strings.
2023-01-21 16:38:48 +00:00
Sergej Jaskiewicz
1f76d39e66
[IR] Make IrTypeArgument a sealed interface
2023-01-20 10:58:28 +00:00
Ilya Goncharov
d7c31f79a8
Do not suppress NPM related tasks, but be aware about checking of them in task graph
2023-01-19 13:43:57 +00:00
Leonid Startsev
dc0cd61b6f
Handle @Serializable classes that implement interfaces by delegation
...
by filtering out delegated properties that end up in irClass.properties() list
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2157
2023-01-19 11:12:31 +00:00
Sergey.Shanshin
d063db3ce0
Fixed missing fallback serializer in contextual serializer
...
Fixes Kotlin/kotlinx.serialization#2158
Merge-request: KT-MR-8338
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com >
2023-01-18 15:47:26 +00: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 Likhachev
4c2923f96f
[IC] Support precise output backup for kapt stubs
...
#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
Dmitriy Novozhilov
259303ca50
[FIR] Fix loading of classId for nested enums in java annotation arguments
...
^KT-55887 Fixed
^KT-55976
2023-01-17 14:51:29 +00:00
Dmitriy Novozhilov
da0dd519d0
[Lombok] Fix substitution of java types in K2 implementation
...
^KT-54020 Fixed
2023-01-17 14:51:29 +00:00
Dmitriy Novozhilov
4363b0815c
[FIR] Add ability to specify if meta annotation itself should match metaAnnotated predicate
...
^KT-55843 Fixed
2023-01-17 14:51:28 +00:00
Nicklas Ansman Giertz
115bc6ac89
KAPT: Fix an ISE when processing unresolved generic types
...
Error types that are generic could sometimes throw an ISE when
generating the stub.
This fixes KT-43786
2023-01-17 11:40:13 +01:00
Nikolay Lunyak
23301e3369
[FIR] Remove annotations.any from FirParcelizeAnnotationChecker
2023-01-17 06:26:39 +00:00
Nikolay Lunyak
f671a8c8a7
[FIR] Rename FirAnnotation.coneClassLikeType to unexpanded
...
The same reason
2023-01-17 06:26:36 +00:00
Nikolay Lunyak
cf73d59e29
[FIR] Remove FirAnnotation.classId from FirParcelize
...
The same reasoning as with the serialization. If we
decide to support it, we wouldn't need to think
about unexpanded types.
2023-01-17 06:26:35 +00:00
Nikolay Lunyak
647cdb1c9a
[FIR] FirSerializationPluginClassChecker
...
This change affects nothing, because @Serializable is checked during
COMPILER_REQUIRED_ANNOTATIONS when typealiases
are not yet resolved, but in case we change something
in the Future and want to support it, we'd have one less problem
2023-01-17 06:26:35 +00:00
Nikolay Lunyak
6a1c9e9279
[FIR] Support typealiases in FirAssignAnnotationMatchingService
2023-01-17 06:26:35 +00:00
Mikhail Glukhikh
7a61578e08
Language version 2.0: fix compiler messages and minor details
2023-01-16 18:16:48 +01:00
Mikhail Glukhikh
0c4a0360ac
Deserialization/class reading: pass chosen JvmMetadataVersion whenever possible
2023-01-16 18:16:07 +01:00
Mikhail Glukhikh
3dc05f4ec5
Introduce language version 2.0 and associate K2 compiler with it
2023-01-16 18:12:55 +01:00
Ilya Chernikov
d8650d9b04
Scripting: support compiler plugins in hosted script compiler
...
Now the plugin-related compiler arguments are respected then used in
the compiler configuration (only in the static part, not supported
if set in a refinement callback)
Note that the "embeddable" version of the plugin should be used if
embeddable compiler is used.
#KT-54095 fixed
2023-01-15 11:14:41 +01:00
Ilya Kirillov
bba8064413
[FIR] mute lazy resolving contract check in a test where it was recently enabled
2023-01-13 15:57:06 +00:00
Ilya Kirillov
a55b4a977b
[FIR] refactoring: extract registration of lazy declaration resolve contract checking to a separate function in tests
2023-01-13 15:57:05 +00:00
Ilya Kirillov
747ab5fdb3
[FIR] get rid of FirFrontendFacadeForDiagnosticTests
2023-01-13 15:57:05 +00:00
Ivan Kochurkin
31e2f0ba95
[FIR][Serialization] Set containingClassForStaticMemberAttr in generateConstructors
2023-01-13 12:55:58 +00:00
Ivan Kochurkin
5d273ce839
[FIR & FIR2IR] Prepare test and CLI infrastructure to support MPP
...
- Move out getAnalyzerServices from FirFrontendFacade to TestSetupUtils
- Simplify DependencyListForCliModule. Now it takes BinaryModuleData as input
- FirOutArtifact contains several FirOutputArtifactPart
- Simplify FirFrontendFacade
2023-01-13 12:55:57 +00:00
Ivan Kochurkin
041f9c4700
[Testing] Simplify test functions
2023-01-13 12:55:56 +00:00
Alexander Udalov
d85b23ebb9
Kapt+JVM_IR: do not attempt to transform error types in InsertImplicitCasts
2023-01-13 02:38:40 +01:00
Alexander Udalov
690fe7ac9a
Kapt+JVM_IR: support error types in suspend functions
...
JVM IR generates the continuation parameter with the name `$completion`
instead of `continuation`.
2023-01-13 02:38:40 +01:00
Alexander Udalov
4f2551497d
Kapt+JVM_IR: do not require KtFile for each generated class
...
In particular, JVM IR doesn't provide KtFile for a multifile facade in
JvmDeclarationOrigin (JVM backend provides KtFile of a random multifile
part). This led to multifile classes being completely ignored in the
JVM_IR version of kapt. Now they are generated correctly and the changed
test passes, but there's a _ir.txt expectation file because the order of
'foo' and 'bar' is different (which is not a problem).
2023-01-13 02:38:40 +01:00
Alexander Udalov
725c066c78
Kapt: dump declaration origins produced by backend
...
This will be useful in diagnosing behavior differences between JVM and
JVM_IR versions of kapt.
2023-01-13 02:38:40 +01:00
Alexander Udalov
6d0628900e
Kapt+JVM_IR: support annotations with error types
...
This is a hack to implement KT-32596 in the JVM IR version of kapt.
Basically we allow psi2ir to generate annotations whose classifier is
error class, which happens when it's unresolved. Because there's no
physical IR for an error class, we create stub IR for it via
SyntheticDeclarationsGenerator in case we'll need it.
With this hack, annotations with unresolved classifiers magically
survive all the way until the codegen (with a minor change in
IrBasedDescriptors) where they are generated as
`@error.NonExistentClass`, which then gets corrected by the kapt's
"correct error types" mode as in all other cases of error types.
2023-01-13 02:38:40 +01:00
Alexander Udalov
4a91957ff0
Kapt+JVM_IR: fix "correct error types" mode for delegated properties
...
Use the property as PSI element origin for delegated property accessors
and field in JVM IR as it is done in the old JVM backend. Otherwise kapt
"correct error types" mode can't find the property type and thus cannot
succeed in "resolving" it, which led to java.lang.Object being used as a
fallback.
Note that in the unmuted test, .txt and _ir.txt dumps differ only in an
unrelated NotNull annotation on a delegate field.
See also KT-37586 for some related changes which fixed this problem
initially in kapt.
2023-01-13 02:38:40 +01:00
Alexander Udalov
549bfb2d9e
Kapt+JVM_IR: generate annotation property initializers
...
#KT-55490 Fixed
2023-01-13 02:38:40 +01:00
Alexander Udalov
1a5aedd27a
Kapt+JVM_IR: unignore some tests
2023-01-13 02:38:39 +01:00
Pavel Mikhailovskii
38a56ba8e8
KT-55308, KT-55769 Sort InnerClasses entries. Add DONT_SORT_DECLARATIONS directive
2023-01-13 01:07:10 +00:00
Dmitriy Novozhilov
1984a1615e
[Serialization] Use new DSL for generating declarations
2023-01-12 17:45:41 +00:00
Dmitriy Novozhilov
5fedb2f72d
[Parcelize] Use new DSL for generating declarations
2023-01-12 17:45:41 +00:00