Commit Graph

2562 Commits

Author SHA1 Message Date
Andrey Zinovyev 8c464b4de5 [KAPT] Bring back properties resolution in light analysis
Because kapt fails on evaluation constant expressions of SomeType::class
2021-04-14 07:50:22 +00:00
Sergey Shanshin 5f9fe8e5de Fix IR compilation of kotlix.serialization runtime in native 2021-04-12 17:08:08 +03:00
Vladimir Dolzhenko 613eda5016 Fix PackageFragmentProvider#isEmpty(FqName) for REPL 2021-04-09 21:06:32 +03:00
Denis.Zharkov e74a0c7ef7 Pass languageVersionSettings to AbstractTypeApproximator 2021-04-09 13:06:35 +03:00
Vladimir Dolzhenko e511eec90e Added optimized PackageFragmentProvider#isEmpty(FqName) 2021-04-09 09:27:39 +00:00
Leonid Startsev f94e8f95d1 Support new inline(value) class syntax in serialization plugin
Use .isInlineClass() instead of .isInline + .isValue

#KT-45783 Fixed
2021-04-08 11:52:18 +00:00
Mikhail Glukhikh 6ee169c01e Rename EffectiveVisibility.Private to PrivateInClass 2021-04-08 09:41:26 +03:00
Abduqodiri Qurbonzoda 19116e5623 Migrate compiler and others from sumBy to sumOf 2021-04-08 03:48:02 +03:00
Abduqodiri Qurbonzoda 40d1849f33 Migrate compiler, idea and others to new case conversion api 2021-04-08 03:22:02 +03:00
Ilya Gorbunov e450a6494a Migrate deprecations in core, compiler, idea, tests
Replacing deprecated Char.toInt() with Char.code and
Number.toChar() with Number.toInt().toChar(), where Number is not Int.

KT-23451
2021-04-07 18:30:20 +03:00
Dmitriy Novozhilov 3ef87d0265 [FIR] Add effective visibility to resolved status
This commit includes:
- introduce FirResolvedDeclarationStatus.effectiveVisibility
- replace FirEffectiveVisibility with EffectiveVisibility
- move calculation of effective visibility from FirEffectiveVisibilityResolver
  (which is deleted) to FirStatusResolver and FirDeserializer
2021-04-06 12:30:46 +03:00
Leonid Startsev 70fa6d50d3 Prohibit serializable inner classes
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1101
2021-04-05 18:26:25 +03:00
Leonid Startsev c66cddc442 Prohibit serializable annotation on local classes and anonymous objects
#KT-45541 Fixed
2021-04-05 18:26:24 +03:00
Leonid Startsev 3b789448a3 Support static final write$Self method inside serializable classes on IR
to properly serialize class hierarchies with/or private fields.
JVM only for now, because Native/JS do not have private fields.
Update tests and test data and rebase fix.
Unify formEncodeDecodePropertyCall functions.
Fix incorrect reference to object in writeSelf,
so properties dependent on other properties would be correctly compared
with defaults.
2021-04-05 18:25:46 +03:00
Leonid Startsev 9be5421e7c Use .nullable extension instead of NullableSerializer() constructor
Use correct projection in createClassReference()
so primitive-boxes arrays behave correctly on JVM
2021-04-05 18:25:45 +03:00
Alexander Udalov ce0c0ad2e3 JVM IR: get rid of toIrBasedKotlinType in MethodSignatureMapper
Commonize (in terms of TypeSystemCommonBackendContext implementations
for KotlinType/IrType) code that computes optimal TypeMappingMode to
apply to different positions where inline class types can be present.
2021-04-01 20:17:45 +02:00
Vyacheslav Gerasimov f2a892a972 Cleanup 201 and as41 bunch files 2021-03-30 14:23:43 +03:00
Ilya Muradyan d40ada5d07 [REPL] Fix syntax errors analysis and incompleteness detection 2021-03-29 18:36:49 +03:00
Dmitriy Novozhilov 37db27da58 Add dependency on :compiler:visualizer to generate-all-tests module 2021-03-29 10:25:51 +03:00
Nikolay Krasko b903f87704 Drop kotin/kotlinx and kotlin/kotlinx.html bintray usages (KTI-528) 2021-03-26 21:08:45 +03:00
Ilya Chernikov bcd7bc5fd7 Fix arguments processing with scriting with old backend by default 2021-03-24 21:26:57 +01:00
Ilya Chernikov 3e458a1efb FIR: Add IncrementalPackagePartsProvider usage in cli...
also refactor IncrementalPackagePartsProvider and parents to simplify
usage
2021-03-24 21:24:18 +01:00
Ilya Muradyan 14d386223b [REPL] Fix unresolved imports caching
Before this fix, if some imports were not resolved during compilation,
this result had been saved in caches, and this import couldn't been
resolved during following compilations even if it was added to the
module dependencies. This commit adds special handling of resolution
caches for the REPL compiler.
2021-03-24 13:35:33 +03:00
Ilya Muradyan ae5fefce51 [REPL] Fix performance problem
Configuration updating was done incorrectly,
and it led to performance degradation.
2021-03-24 13:35:33 +03:00
hungvietnguyen 7c4225b9d1 [Kapt] Ensure flag names and default values are consistent
Group flag names and default values in one place to make the code easier
to read and prevent mistakes and inconsistencies.
2021-03-23 10:41:28 +03:00
Dmitry Petrov 17da240910 JVM_IR KT-45195 generate non-static annotation members as ACC_ABSTRACT 2021-03-18 19:41:24 +03:00
Dmitry Petrov 2fd69a5718 Add bytecode listing tests for 'allopen' plugin with JVM_IR 2021-03-18 19:41:23 +03:00
Sergey Shanshin cfca7183e5 Add inspections and quickfixes of redundant Json format instantiation
Resolves KT-45075
2021-03-18 05:44:03 +03:00
Andrey b7dc1e64b1 [KAPT] Disable JPMS when running annotation processing
If sources contain module-info.java javac tries to validate modules existence/visibility during AP phase and fails, because we don't specify modules-path/patch-module. All these checks will be done in kotlin compiler and in javac for java classes. And it is not necessary to do it in AP too.
So we go for easiest path possible - disable jpms for AP. 

#KT-32202 Fixed
2021-03-17 11:10:27 +03:00
Yan Zhulanow 1dad549c81 All-open: Add Micronaut preset (KT-26325) 2021-03-16 19:21:50 +09:00
Yan Zhulanow 5fca37fa0f Pill: Do not delete existing artifacts for JPS build 2021-03-16 19:21:49 +09:00
Yan Zhulanow cfd585e221 Pill: Remove 'kotlin-coroutines-experimental-compat' from mapped libraries 2021-03-16 19:21:49 +09:00
Yan Zhulanow 4e8ec69ca7 Pill: Support kotlinx.serialization plugin 2021-03-16 19:21:49 +09:00
Yan Zhulanow cc41ccc3b9 Pill: Disable all compiler plugins by default 2021-03-16 19:21:48 +09:00
Yan Zhulanow 61cd97b340 Pill: Remove unused EmbeddedComponents class 2021-03-16 19:21:48 +09:00
Yan Zhulanow a00f3b97c5 Pill: Move utility classes to util package 2021-03-16 19:21:48 +09:00
Yan Zhulanow 6da03c0cda Pill: Move project model out of parser file 2021-03-16 19:21:48 +09:00
Yan Zhulanow e4ce48d9ef Pill: Extract artifact-related components to their own package 2021-03-16 19:21:47 +09:00
Yan Zhulanow 901bfbb3c7 Pill: Create KotlinArtifact only for variants that include BASE 2021-03-16 19:21:47 +09:00
Yan Zhulanow 6ff68311c1 Pill: Support module prefixes 2021-03-16 19:21:47 +09:00
Yan Zhulanow a561fb85ad Pill: minor, fix inspection warnings 2021-03-16 19:21:47 +09:00
Yan Zhulanow 4708525b9a Pill: Refactor Pill variants, replace DEFAULT variant with nullable value 2021-03-16 19:21:46 +09:00
Yan Zhulanow 51a23b7aeb Pill: Always import Pill importer module for debugging purposes 2021-03-16 19:21:46 +09:00
Yan Zhulanow c2cbbc5aba Pill: Removed unused NONE variant 2021-03-16 19:21:46 +09:00
Yan Zhulanow f84c1d7354 Pill: Fix warnings in PillExtensionMirror 2021-03-16 19:21:45 +09:00
Yan Zhulanow 880067946e Pill: Do not import kotlin-serialization library as dist dependency as it doesn't exist in dist/kotlinc 2021-03-16 19:21:45 +09:00
Yan Zhulanow 38d88877a3 Pill: Map kotlin-coroutines-experimental-compat library 2021-03-16 19:21:45 +09:00
Yan Zhulanow cc56511585 Pill: Map 'java9' source sets of standard library and tests 2021-03-16 19:21:45 +09:00
Zac Sweers 12a6352bef Fix NPE in KaptJavaLog
See https://issuetracker.google.com/issues/162446295 for more context, but in short: this will fail if the project:
* targets java 8
* consumes external libraries targeting a higher version (java 9+). This includes Android SDK 30's android.jar, which targets java 9
* has `mapDiagnosticLocations` enabled for kapt

targetElement is a nullable type, so this seems like a pretty cut-and-dry NPE fix
2021-03-16 19:21:44 +09:00
Andrey fe6ddcc1fa [KAPT] Skip kapt tasks if no annotations processors are provided (#4190)
So we don't do any preparation, don't spin up compiler.  And user will see SKIPPED in task execution
2021-03-15 11:37:06 +03:00