Commit Graph

2534 Commits

Author SHA1 Message Date
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
Ilya Chernikov 7d07010785 Fix handling of lambdas in top-level destructuring declarations 2021-03-11 15:50:32 +01:00
Ilya Chernikov 10567d9a37 [minor] fix scripting test dependencies 2021-03-11 15:50:31 +01:00
Ilya Chernikov ef01411d20 [minor] fix script util tests 2021-03-11 15:50:30 +01:00
Ilya Chernikov 375441832e Implement REPL support in IR scripting 2021-03-11 15:50:30 +01:00
Ilya Chernikov e9da385f7c Implement property for passing argumens to isolated script compiler 2021-03-11 15:50:06 +01:00
Ilya Chernikov 43d7536a28 Protect scripts compilation from passing -Xuse-ir via configuration
as well as other options that require changes in the compilation setup
before compiler options from the configuration could be processed
2021-03-11 15:50:06 +01:00
Ilya Chernikov bac6a7346e Extend GeneratorExtensions with previous script, implemt it for JS REPL
also refactor JS REPL for better compatibility with the generic
REPL/scripting infrastructure
2021-03-11 15:50:01 +01:00
Ilya Chernikov 4dc228a0a3 Implement proper call to the base class ctor in ir script lowering 2021-03-11 15:49:46 +01:00
Ilya Chernikov 4c6b5ff0b8 Implement IR backend support in scripting tests, enable for some tests 2021-03-11 15:49:44 +01:00
Alexander Likhachev 6bd44df861 [Build] Fix configuration cache issues (part 6)
Make DexMethodCountStats task class, tasks :examples:kotlin-jsr223-daemon-local-eval-example:test,:idea:idea-fir:test, :idea:idea-fir-performance-tests:test, :idea:idea-frontend-fir:test, :idea:idea-frontend-fir:idea-fir-low-level-api:test, :kotlin-compiler-client-embeddable:test, :kotlin-compiler-embeddable:test, :kotlin-stdlib-js-ir:compileTestKotlinJs, :plugins:android-extensions-compiler:test, :plugins:parcelize:parcelize-compiler:test, :compiler:test compatible with configuration cache
Relates to #KT-44611
2021-03-11 14:12:36 +03:00
Alexander Udalov 566f97ae3e JVM IR: remove dependency of 'backend.jvm' on 'psi2ir', 'ir.serialization.jvm'
Add a new module 'backend.jvm.entrypoint' which depends on psi2ir and
contains code that runs psi2ir + JVM IR backend with serialization
implementations.

Hopefully this will allow to compile these modules in parallel and
reduce the build time.
2021-03-05 20:46:33 +01:00
Sergey Shanshin bf6dda2d99 Lazy delegate for serializer in objects, sealed and abstract classes
Fixes Kotlin/kotlinx.serialization#585
2021-03-03 21:41:37 +03:00
Andrey Zinovyev b128577508 [KAPT] Some optimizations for stubs generation
* Add index to resolve compiled class by name
* Disable full property resolution
2021-03-03 12:05:49 +03:00
Anton Bannykh b0e0e62c0b Propagate isExternal flag in Psi2Ir and deserializer 2021-03-02 14:30:16 +03:00
Mikhael Bogdanov 373d0ac660 Fix ultra light class generation for private suspend methods 2021-03-01 16:20:20 +01:00
Dmitry Savvinov 42345b9c49 Minor: use more clear and specific naming for LazyClassContext.typeChecker (relevant for MPP with type refinement) 2021-02-26 12:37:02 +03:00
Alexander Udalov 0ebdf7c3c4 IR: add getPrimitiveType, optimize some usages of isInt/isByte/... 2021-02-25 21:00:09 +01:00
Ilya Kirillov 83f8650e80 Move CallableId from fir module to compiler.common to use in IDE 2021-02-24 20:13:41 +01:00
Alexander Udalov 7e149a3a44 IR: remove unneeded dependencies on psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov addabae8d2 IR: move frontend-dependent code into implementations in psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov d991a3e40f IR: simplify initialization cycle of TypeTranslator/ConstantValueGenerator 2021-02-24 19:07:38 +01:00
Pavel Semyonov 7669d8ff26 Add README.md for the kotlin-parcelize plugin 2021-02-25 02:59:50 +09:00
Alexander Udalov ca5a35b4b3 Move CompilerEnvironment from 'frontend' to 'cli'
This is needed in order to have a single convenient place where to
register frontend services implemented _outside_ of the 'frontend'
module, such as the control flow analysis, extracted to a separate
module in a subsequent commit.
2021-02-24 17:17:03 +01:00
Tianyu Geng 56854a8b1a FIR IDE: register quickfix for the following
1. NON_ABSTRACT_FUNCTION_WITH_NO_BODY
  2. ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS
  3. ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
2021-02-19 13:16:42 +01:00
Sergey Shanshin 8c20c655fe Updated bytecode of serialization for IR
`shouldEncodeElementDefault` now checked before evaluating default value
2021-02-18 15:03:35 +03:00
Alexander Udalov dbadd5846a Add test for script flag in kotlin.Metadata
It passes at the moment because the test uses old backend, but the
required behavior is not yet supported in JVM IR, and it'll need to be
fixed.
2021-02-18 12:36:54 +01:00
Alexander Udalov 1d6b198915 Build: suppress version and JVM target warnings
To further reduce the output on each build.
2021-02-18 12:17:17 +01:00
Alexander Udalov 49fc1b9e3e Build: enable -Werror for several modules 2021-02-18 12:14:09 +01:00