Commit Graph

657 Commits

Author SHA1 Message Date
Mikhail Glukhikh 007cf2ce7c Rename AnalysisFlags.useExperimental to optIn 2021-09-10 16:29:18 +03:00
Victor Petukhov 86d8468b8b Introduce a compiler X-flag to use the builder inference by default for all calls
^KT-48622 Fixed
2021-09-08 13:09:19 +03:00
Alexander Udalov 0a10cec579 Remove obsolete -X compiler arguments for JVM backend
-Xno-exception-on-explicit-equals-for-boxed-null
-Xstrict-java-nullability-assertions
-Xuse-old-spilled-var-type-analysis
-Xpolymorphic-signature
2021-09-02 22:11:22 +02:00
Alexander Udalov 1864716c83 Remove -Xnormalize-constructor-calls
Constructor call normalization is enabled by default since 1.3.
2021-09-02 22:11:22 +02:00
Alexander Udalov 0213c25c9b Remove obsolete check for language version and IR backends 2021-09-01 16:30:41 +02:00
Georgy Bronnikov 778b04ae34 JVM_IR: rename -Xparallel-backend-threads to -Xbackend-threads 2021-09-01 17:28:23 +03:00
Ilya Goncharov ecefda58fb [JS IR] Add separate key to enable extensions in external interfaces 2021-09-01 13:47:12 +00:00
Alexander Udalov 473ed2e410 Fix JVM target and language version info in CLI and Gradle 2021-09-01 14:32:53 +02:00
Alexander Udalov fbfbb0c72c CLI: support false and true values for boolean -X arguments
#KT-48417 Fixed
2021-08-30 19:45:03 +02:00
Ilya Chernikov a45e31720c Make state of the default REPL compiler explicit and replaceable
restores proper object hierarchy in case the legacy REPL infrastructure
2021-08-24 21:39:37 +03:00
nataliya.valtman 64da19cb2d Add Artifact Transform stat into ES 2021-08-24 16:33:11 +03:00
Victor Petukhov dc8dbad0bc Add compiler X-flag to enable self upper bound type inference
^KT-48026 Fixed
2021-08-04 17:36:52 +03:00
Dmitry Petrov ebf837c135 JVM_IR disable IR and bytecode validation by default 2021-07-30 20:21:41 +03:00
Alexander Udalov 0083ef053b Remove Gradle option annotation for -Xbuiltins-from-sources
This is an internal compiler argument for FIR which doesn't seem
valuable enough to be exposed in Gradle, because it'd require to perform
some kind of deprecation if it's changed or removed. It'll still be
possible to use it via `freeCompilerArgs += "-Xbuiltins-from-sources"`.

Note that generated Gradle options are not changed because the generator
was not rerun after adding this compiler argument. (And the test that
checks that the generator was run is failing right now.)
2021-07-26 19:36:53 +02:00
Denis.Zharkov 8f06e59d3b Implement new faster version of Jar virtual file system
It's only enabled by default in FIR and might be turned on with a CLI flag

The main idea is that default FarFS re-read ZIP file list each time when
class file is requested that is quite slow.
We read it once and them reading bytes from the known offset.

Also, unlike the default version we don't perform attributes check on each access
On the one hand, it works faster on the other it might not notice that one
of the JAR has been changed during compilation process
But looks like it's not supposed to be a frequent even during
compilation of a single module
2021-07-23 21:38:38 +03:00
Nikolay Krasko ec99585eb9 Remove explicit registration of classFileDecompiler EP and core.xml 2021-07-23 16:58:27 +03:00
Nikolay Krasko bba0dfb469 Cleanup as42 bunch files
We don't build AS42 plugin from main kotlin repo anymore.
2021-07-23 16:58:24 +03:00
Ilya Chernikov 5b2acea98f FIR: Add analysis flag for loading IR builtins from sources 2021-07-16 02:24:32 +03:00
Georgy Bronnikov b2617199bc JVM_IR: call serialization for IR.
Serializer for IR is called when -Xserialize-ir flag is set.
2021-07-14 21:20:04 +03:00
Mikhail Glukhikh 113d2653aa Drop deprecated -Xexperimental flag from compiler and tests 2021-07-14 21:18:23 +03:00
Nikita Bobko 83c5c41dd4 Fix that marketplace identifies newly uploaded Kotlin plugin artifacts as Kotlin 1.2 artifacts
This `compiler.xml` is packed into `kotlin-idea.jar` and causes troubles for marketplace
in identifying correct Kotlin plugin version
2021-07-12 22:04:20 +03:00
Mikhail Glukhikh a997a98054 Commend -Xopt-in deprecation warning (due to bootstrap problems) 2021-07-12 21:26:21 +03:00
Mikhail Glukhikh 5871f3d663 CLI: support -option=value syntax for non-advanced flags #KT-47640 Fixed 2021-07-12 21:26:19 +03:00
Mikhail Glukhikh d8417fd622 Introduce -opt-in stable compiler option instead of -Xopt-in
#KT-47099 Fixed
2021-07-12 21:26:18 +03:00
Mikhail Glukhikh 195b6d1fb1 Deprecate -Xuse-experimental #KT-47623 Fixed 2021-07-12 21:26:16 +03:00
Victor Petukhov 33a281c637 Introduce separate compiler flag for unrestricted builder inference 2021-07-12 13:57:13 +03:00
Alexander Udalov 68432f0c20 Fix deprecation/unchecked warnings after update to 203 2021-07-09 14:24:07 +02:00
Alexander Udalov 25f0beed12 Load async-profiler.jar if possible when using -Xprofile
Instead of requiring it to be on the compiler classpath.

This will make it much easier to profile the Kotlin compiler daemon in
Gradle, by just specifying a compiler argument instead of also manually
patching the compiler jar.
2021-07-08 20:44:45 +02:00
Victor Petukhov 74aa8e7497 Get rid of singleOrNull of NullabilityAnnotationStates 2021-07-06 09:54:31 +03:00
Victor Petukhov b0a44705b4 Take into account user defined jsr-305 annotations 2021-07-06 09:54:30 +03:00
Victor Petukhov b2dff10e32 Implement caching states for nullability annotations 2021-07-06 09:54:30 +03:00
Victor Petukhov a82772f31a Depend on passed language version explicitly to compute nullability annotation settings 2021-07-06 09:54:29 +03:00
Victor Petukhov ea901d81fb Get rid of redundant Jsr305State 2021-07-06 09:54:28 +03:00
Victor Petukhov 6d3badb2cd Support configuring of nullability annotations with their report levels through a test directive 2021-07-06 09:54:27 +03:00
Victor Petukhov 46d0b16142 Use new default settings for java nullability annotations in JavaTypeEnhancementState and get rid of all hardcoded defaults 2021-07-06 09:54:24 +03:00
Victor Petukhov c8af1b735f Introduce compiler flag to manage status of specific Java nullability annotations 2021-07-06 09:54:23 +03:00
Ilya Goncharov 21a3494bca [JS IR] Add test with boolean in external interface
[JS IR] Add possibility to safely access Boolean in external declaration

[JS IR] Add diagnostic for booleans in externals
2021-06-29 10:12:54 +00:00
Yahor Berdnikau 430306b23d Change 'jvmTarget' backing property visibility to internal.
Allows to check if this property was updated by the user or not.

^KT-45611 In Progress
^KT-43095 In Progress
2021-06-25 16:28:54 +00:00
Andrey Uskov 92b08dfcfb Revert "Unify the way to set compiler options using System.properties"
This reverts commit 28e4e775
2021-06-23 11:34:04 +03:00
Andrey Uskov 28e4e77542 Unify the way to set compiler options using System.properties
Now compiler flags with boolean values which are controlled by system
properties could be set in similar way. The following syntax is
appropriate. For setting flag:
'-DflagName,'-DflagName=[y|Y|true|TRUE|yes|YES|on|ON]'
for unsetting flag:
'-DflagName=[n|N|false|FALSE|no|NO|off|OFF]'
2021-06-22 19:35:28 +03:00
nataliya.valtman f6b428f271 KT-34862 use abi snapshot instead of build history files
Use jar snapshot instead build history file to avoid using time stamps and support remote gradle cache
2021-06-22 07:48:14 +03:00
nataliya.valtman d42a6771b0 Update statistics that should be sent to ES
Next properties should be set in gradle.properties or via -D option:
systemProp.kotlin.plugin.stat.password
systemProp.kotlin.plugin.stat.user
systemProp.kotlin.plugin.stat.enabled=true
systemProp.kotlin.plugin.stat.label
systemProp.kotlin.plugin.stat.endpoint=es_endpoint/index/_doc
kotlin.build.report.verbose=true
kotlin.build.report.enable=true
2021-06-11 19:12:05 +03:00
nataliya.valtman 117c99aee6 send build stat to ES 2021-06-09 13:25:10 +03:00
Andrey Zinovyev 3572a96bb9 [FIR] Lookup in local sources in default imports based on the flag
Reuse ALLOW_KOTLIN_PACKAGE for that
2021-06-08 08:23:25 +00:00
Ilya Goncharov 18cb8a1b9b [JS IR] Add flag with writing base class to metadata 2021-05-20 16:37:45 +03:00
Ilya Goncharov 228c6879f5 [JS IR] Add per-module output module name 2021-05-20 16:37:44 +03:00
Anton Bannykh 6e40c814c8 [JS IR] add a flag which prepends a custom prefix to the per-module .js files 2021-05-20 16:37:37 +03:00
Anton Bannykh 6633a9edc0 [JS IR] add a flag which enable safe property access
If an accessor is not available at runtime we fall back
to the property access.

This is useful in cases when JS objects are casted to Kotlin
classes implicitly. This pattern did work in the old BE, which
lead to a significant amount of code which doesn't work anymore.
2021-05-20 16:37:34 +03:00
Yahor Berdnikau 800e382ba9 Warn on using 'jdkHome' option in Gradle builds.
User should instead use KotlinJavaToolchain that will take care of
tracking major java version and provide nicer API.

Gradle will still pass jdkHome value to the compiler, but it should
be changed in Kotlin 1.6 release.

^KT-45611 Fixed
2021-05-17 16:57:01 +03:00
Ilya Goncharov 19393948d7 [Gradle, JS] irBuildCache means ir compiler enabled 2021-05-12 11:57:14 +03:00