Commit Graph

66577 Commits

Author SHA1 Message Date
Natalia Selezneva 1b7f72020e GradleScriptListener should be applicable for all gradle scripts
Not only for those that are in project
Otherwise changes in those unrelated to gradle project script will affect up to date of other scripts
2020-04-23 20:13:58 +03:00
Natalia Selezneva 426c0c9ff0 201: Run partial import in IDEA 2020.1 to get script configurations
It only requests for KotlinDslScriptsModel
^KT-34481 Fixed
2020-04-23 20:13:58 +03:00
Natalia Selezneva 10aeead925 Run gradle import instead of usage of scripting API during configurations update
For Gradle 6.0 or higher
^KT-34481
2020-04-23 20:13:57 +03:00
Natalia Selezneva 97e5ff858d Add ability to postpone script configuration loading
Show notification for scripts with out of date configurations

^KT-35573
2020-04-23 20:13:57 +03:00
Natalia Selezneva 7f5715f5da 201: KotlinDslScriptsModel: use ProjectModelContributor to process models
Instead of populateProjectExtraModels in Resolver
2020-04-23 20:13:57 +03:00
Ilya Goncharov 9e4c1ee4e8 [Gradle, JS] Add explanation comment on compiler type in KotlinJsCompilerTypeHolder 2020-04-23 18:43:19 +03:00
Georgy Bronnikov 565874b3a0 Pass along type in IfNullExpressionFusionLowering 2020-04-23 18:18:34 +03:00
Ilya Goncharov f95ff049c6 [Gradle, JS] Test check several ways to configure compiler type
#KT-38519 fixed
2020-04-23 18:09:59 +03:00
Ilya Goncharov 9a3bf54d9d [Gradle, JS] Add compiler type values on extension type
#KT-38519 fixed
2020-04-23 18:09:49 +03:00
Alexander Udalov 025d1ca64d psi2ir: rework representation of bound adapted function references
This fixes the problem in JVM IR backend which didn't pass bound
receiver value of an adapted function reference to the superclass
(kotlin/jvm/internal/AdaptedFunctionReference), which caused equals to
work incorrectly on such references (see changes in box tests).

Previously, bound adapted function reference was represented as
IrFunctionExpression to an adapter function which calls the callee. The
value of the bound receiver in that case could only be found in the body
of that adapter function. This is not very convenient, so this change
makes psi2ir produce a block of the adapter function + reference to it.
The bound receiver value is then found in the reference. This is
basically similar to what ProvisionalFunctionExpressionLowering is doing
for all function expressions. And since this IR structure is already
supported in FunctionReferenceLowering, the problem in the JVM IR is
fixed without any additional modifications.

However, inliners do not support this IR structure yet, see KT-38535 and
KT-38536.
2020-04-23 16:47:23 +02:00
Alexander Udalov 22bf23025a Minor, workaround IDE exception KT-38521 2020-04-23 16:46:32 +02:00
Konstantin Tskhovrebov 73a6dc6d1e Fix dependency for idea-fir module on 191 IDEA. 2020-04-23 17:22:59 +03:00
Ilya Goncharov f87f32c5a8 [Gradle, JS] root package json must run after simple package jsons
KT-34832
2020-04-23 17:21:17 +03:00
Jinseong Jeon 39e1635c41 [FIR2IR] Pre-cache original function type parameters for fake overrides 2020-04-23 17:19:44 +03:00
Martin Petrov bc96e42585 Produce deterministic klib files.
Build systems like bazel rely on the output of a compilation being
deterministic. File checksums determine when an artifact is safe to
cache across builds. One can produce a klib deterministically by using a
fixed timestamp during klib compression.

Before this change:

```
$ kotlinc-native  -produce library -output /tmp/first/color.klib Color.kt
$ kotlinc-native  -produce library -output /tmp/second/color.klib Color.kt
$ shasum  /tmp/first/color.klib /tmp/second/color.klib
bc3f73678ff025cfbec9009f9a851a8ca74e1037  /tmp/first/color.klib
65aa37886fbd53285f2e449a4dab6a2ad02732e6  /tmp/second/color.klib
```

After this change:

```
$ kotlinc-native  -produce library -output /tmp/first/color.klib Color.kt
$ kotlinc-native  -produce library -output /tmp/second/color.klib Color.kt
$ shasum  /tmp/first/color.klib /tmp/second/color.klib
fcba304493916ae34d372188991f87b60a113cf3  /tmp/first/color.klib
fcba304493916ae34d372188991f87b60a113cf3  /tmp/second/color.klib
```
2020-04-23 15:53:45 +03:00
Ilya Goncharov 923986d6a0 [Gradle, JS] Replace close on prepare
#KT-34832 fixed
2020-04-23 15:49:35 +03:00
Ilya Goncharov 7fa0faf48c [Gradle, JS] Fix registering yarn extension before node plugin
#KT-34832 fixed
2020-04-23 15:49:35 +03:00
Ilya Goncharov bded8443f1 [Gradle, JS] Root package json must run after all package json
#KT-34832 fixed
2020-04-23 15:49:35 +03:00
Ilya Goncharov b0efd1d7ce [Gradle, JS] Commonize root package json to prepared files for extensibility via other npm package managers
#KT-34832 fixed
#KT-35194 fixed
2020-04-23 15:49:33 +03:00
Ilya Goncharov 2f8649a337 [Gradle, JS] up-to-date check on npm install, not on root package.json
#KT-34832 fixed
2020-04-23 15:46:58 +03:00
Ilya Goncharov 742e27d7f5 [Gradle, JS] Rearrange
#KT-34832 fixed
2020-04-23 15:46:47 +03:00
Ilya Goncharov e412224572 [Gradle, JS] Resolve -> install
#KT-34832 fixed
2020-04-23 15:46:36 +03:00
Ilya Goncharov 0af6454e44 [Gradle, JS] Add new state for npm resolution
#KT-34832 fixed
2020-04-23 15:46:25 +03:00
Ilya Goncharov 9174e184d3 [Gradle, JS] Rename Installed on prepared
#KT-34832 fixed
2020-04-23 15:46:13 +03:00
Ilya Goncharov 578a33767b [Gradle, JS] Npm resolution plugins work in resolve phase too
#KT-34832 fixed
2020-04-23 15:46:01 +03:00
Ilya Goncharov 910f60b731 [Gradle, JS] Not run task if root package.json doesn't exist
#KT-34832 fixed
2020-04-23 15:45:50 +03:00
Ilya Goncharov 86573c6dd1 [Gradle, JS] Divide creating root package and install tasks
#KT-34832 fixed
2020-04-23 15:45:34 +03:00
Alexey Trilis 3ad597ca5c Introduce MSE and EME APIs to Kotlin/JS stdlib
#KT-37910 Fixed
2020-04-23 15:35:04 +03:00
pyos 456469eb3b JVM: fix remapping of new T inside regenerated copies of T
In general, `InliningContext.findAnonymousTransformationInfo` was not
reliable because it mapped each type to *some* info for that type,
preferring ones with `shouldRegenerate == true` if those exist. Thus, it
returned incorrect results if one type was regenerated multiple times,
e.g. in a nested inlining context or because of a `finally` (which
duplicates anonymous objects). The solution is to avoid a global map and
attach the current transformation info directly to the current inlining
context.
2020-04-23 14:20:54 +02:00
Sinan Kozak 3f8ffb5ea7 KT-24750 Blank line after class header formatter should use user setting 2020-04-23 18:48:38 +07:00
Konstantin Tskhovrebov e6f527f1d0 Update tests: disable tests run gutters for Object. 2020-04-23 14:16:22 +03:00
Mikhail Glukhikh 57b4a54766 [FIR] Calculate effective visibility inside anonymous object properly
#KT-38432 Fixed
2020-04-23 13:57:27 +03:00
Mikhail Glukhikh bb73681b62 [FIR] Avoid integer literal types in lambda analysis
Partial fix of KT-38473
2020-04-23 13:46:40 +03:00
Mikhail Glukhikh 2805108061 [FIR2IR] Slightly refactor ConversionUtils 2020-04-23 13:44:13 +03:00
Mikhail Glukhikh 09f9e767ed [FIR2IR] Slightly refactor DataClassMembersGenerator 2020-04-23 13:44:13 +03:00
Jinseong Jeon 07add635eb FIR2IR: generate synthetic members for data class only if needed 2020-04-23 13:44:13 +03:00
Vladimir Ilmov acced52384 (CoroutineDebugger) Tests added for no creation stack frame information 2020-04-23 11:36:15 +02:00
Vladimir Ilmov 57214aa453 (CoroutineDebugger) Exception if no creationStackTrace available
#KT-38484 Fixed
2020-04-23 11:36:15 +02:00
Ilya Chernikov 8616864e6b Revert "Drop unnecessary dependency from embeddable compiler to daemon"
The commit breaks gradle plugin, because it relies on this dependency.
This reverts commit 86d47b49
2020-04-23 11:21:27 +02:00
Mark Punzalan b74652aa5b [FIR] Use ieee754equals for floating-point equality operations 2020-04-23 11:50:54 +03:00
Denis Zharkov d66281d11f FIR: Fix test data for spec test after c4b7ac994b 2020-04-23 11:24:49 +03:00
Ilya Kirillov 1a90866ce1 FIR: handle member scope for anonymous objects
#KT-37120 fixed
2020-04-23 10:38:41 +03:00
Ilya Kirillov fdfb544730 FIR: use Kotlin String constructors instead of java.lang ones
#KT-38437 fixed
2020-04-23 10:37:41 +03:00
Ilya Kirillov 9b943e3a5a FIR: fix Long primitive type JVM signature 2020-04-23 10:37:41 +03:00
nataliya.valtman f9ebce331c remove execOperation for compiler workers 2020-04-23 07:59:57 +03:00
Abduqodiri Qurbonzoda 5af76a07d4 Fix CharArray sort in JS IR-backend 2020-04-22 23:46:50 +03:00
Ilya Chernikov 284d413603 Fix daemon test task name 2020-04-22 21:49:39 +02:00
Nikolay Krasko b439dd62c5 Allow to force snapshot build 2020-04-22 21:19:35 +03:00
Vladimir Ilmov 9b0e37f627 (CoroutineDebugger) Minor issued fixed, log level adjusted for missing classes in JVM. 2020-04-22 17:44:11 +02:00
Mads Ager eec3263518 [psi2ir] Properly link corresponding property symbols.
Do not rely on PatchDeclarationParents to do so.
2020-04-22 16:26:59 +02:00