Commit Graph

61046 Commits

Author SHA1 Message Date
Mikhail Glukhikh dc4f332c08 [FIR] Implement early calculation of "not SAM" flag for classes 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh 279adae3e4 [FIR] Implement primitive tower for type resolving 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh 7721eaab23 [FIR] Transform qualified access / callable refs type arguments properly 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh 483ce8bf04 [FIR TEST] Stabilize top-level extension vs outer member behavior 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh ef8485a232 FIR2IR: change receiver handling in case it's an outer object
Before this commit, FIR2IR expected that FIR will have no receiver
in this case. However, now FIR *has* receiver, so we have to convert
it to object correctly
2020-01-27 00:34:16 +03:00
Mikhail Glukhikh 14204a842a Refactoring & clarification: implement new FIR tower resolver 2020-01-27 00:34:16 +03:00
simon.ogorodnik a3ab763f0b [FIR] Get rid of processors in FirScope 2020-01-27 00:34:16 +03:00
Dmitriy Dolovov 224b2acdcc K/N: Get rid of remaining parts of "lite" KLIB API
Rewrite it in clean way and move to 'idea-gradle' module.
2020-01-26 22:17:50 +07:00
Dmitriy Dolovov a7da605816 K/N: Drop unused part of "lite" KLIB API 2020-01-26 14:52:11 +07:00
Dmitriy Dolovov 345863a1d2 Fix: KotlinNativeABICompatibilityChecker.dispose() leads to dead lock
Issue #KT-36040
2020-01-26 11:07:30 +07:00
Dmitry Savvinov d1e14598a6 Add IDE support for common klibs 2020-01-25 15:59:12 +03:00
Dmitry Savvinov 6d45b048cb Check for presence of ir-folder in klibs additionally for Kotlin/Native 2020-01-25 15:59:12 +03:00
Dmitry Savvinov 5665261e5b Minor: extract name of ir-folder in klib into const property 2020-01-25 15:59:12 +03:00
Dmitry Savvinov 7ecab7f0aa Pass proper metadata_version in K2MetadataKlibSerializer
Otherwise newer IDE Plugins will think that it's an old klib and will
refuse to analyze against it
2020-01-25 15:59:12 +03:00
Sergey Igushkin 823d3cc412 (minor) Fix accessing a shared-native compilation's konanTarget
As future some Kotlin/Native compilations in the future may have
different platforms within one target, it's more preferable to
access the konanTarget from the compilation, not its target.
2020-01-24 23:20:56 +03:00
Sergey Igushkin 1f42951152 Fix KlibBasedMppIT test compilation error (missing import) 2020-01-24 20:49:57 +03:00
Vyacheslav Gerasimov 1f3755248c Build: Make task inputs relative to improve caching 2020-01-24 19:40:00 +03:00
Vyacheslav Gerasimov 8e0dd604af Build: Annotate KotlinModuleShadowTransformer with @CacheableTransformer 2020-01-24 19:40:00 +03:00
Vyacheslav Gerasimov 131765537a Build: Implement preserveFileTimestamps for stripMetadata task 2020-01-24 19:40:00 +03:00
Vyacheslav Gerasimov 82182893ad Build: Set preserveFileTimestamps & isReproducibleFileOrder properties
Otherwise some jars always have different key in the build cache
2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 317972db2a Build: Make :kotlin-reflect:stripMetadata cacheable 2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 760e34aeec Build: Fix type of builtinsJar task
Should be org.gradle.api.tasks.bundling.Jar
2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 526f29cc1a Build: Upgrade com.github.jengelman.gradle.plugins:shadow to 5.2.0 2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 3f10329347 Build: Fix publication of stdlib-js to avoid publishing all artifacts
Because of https://github.com/gradle/gradle/issues/4612 install and
uploadArchives tasks published artifacts which were not meant
to be published
2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 7dcdc506d8 Build: Fix outputs for :kotlin-stdlib-js:compileJs
jsOutputMetaFile was missing
2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 770344770d Build: Make :kotlin-stdlib-js:compileJs task cacheable 2020-01-24 19:39:58 +03:00
Vyacheslav Gerasimov 392e5a6edd Build: Make :kotlin-compiler:proguard task cacheable 2020-01-24 19:39:58 +03:00
Vyacheslav Gerasimov 8dd6a34e17 Build: Make :core:builtins:serialize task cacheable 2020-01-24 19:39:58 +03:00
Sergey Igushkin d1826374a6 Fix the K/N stdlib leaking into other common source sets
The Kotlin/Native stdlib was added to the shared-native source sets
in order for the IDE to import the stdlib dependency.

However, it was added to the '*Implementation' configuration, from
where it was also collected for the dependency source set
visibility inference algorithm. The current implementation of source
sets visibility inference only works for module dependencies and is
not quite suitable for local file dependencies. The implementation
should likely be fixed, but for now, it's enough to add the dependency
directly to the place where the visibility inference results are
taken from by the IDE during import, i.e. to the
'*ImplementationDependenciesMetadata' configurations.

Also, since all tests were flawed by the leakin K/N stdlib, the
K2Metadata/Klib compiler mistakenly didn't include its own built-ins
to the module dependencies (and everything worked because the K/N
built-ins were there). Now that the K/N doesn't leak, the compiler
must add its own built-ins.
2020-01-24 19:00:45 +03:00
Sergey Igushkin 970ee4539b Common klib support in the Kotlin Gradle plugin (KT-32677)
Refactor the Kotlin/Native compilations and tasks to support
Kotlin/Native-shared source sets compilation within the metadata target.

Provide the feature flag kotlin.mpp.enableCommonKlibs that enables
the following behavior:
* compilation of Kotlin/Native-shared source sets to a klib using
the Kotlin/Native compiler.
* compilation of common source sets (not just Kotlin/Native) into a
klib rather than *.kotlin_metadata

Issue #KT-32677 Fixed
2020-01-24 19:00:44 +03:00
Vyacheslav Gerasimov dd9ac39b65 Build: Add :compiler:ir.serialization.common to kotlin-plugin.jar
:compiler:ir.serialization.jvm contains classes depending on this module
which makes idea plugin verifier to fail.

 #KT-36103
2020-01-24 18:27:41 +03:00
Vsevolod Tolstopyatov e4d82a6dbb Merge remote-tracking branch 'origin/master' 2020-01-24 17:59:27 +03:00
Mikhail Zarechenskiy b647d2c645 Prolong deprecation cycle for several restrictions until 1.5
ProhibitInvisibleAbstractMethodsInSuperclasses &
 ProhibitNonReifiedArraysAsReifiedTypeArguments were implemented in
 1.3.70, so actually they should be enabled only in 1.5
2020-01-24 17:29:55 +03:00
Victor Petukhov 5c6e710013 Revert "Workaround an inliner problem upon which the compiler code itself stumbled ^KT-35856 Fixed"
This reverts commit 59175912
2020-01-24 16:41:22 +03:00
Dmitry Petrov 90b250d241 PSI2IR: Fix bound inner class constructor callable reference generation 2020-01-24 16:32:07 +03:00
Alexander Udalov f7321b497b Set KotlinCompilerVersion.IS_PRE_RELEASE = true
Since master is now 1.4-M1, and 1.4 is a pre-release version.
2020-01-24 14:18:51 +01:00
Vsevolod Tolstopyatov a00e98bad9 KT-36118 Introduce AbstractCoroutineContextKey and corresponding extensions required by its implementors
* It enables subtyping relationship for keys and elements, allowing type-safe and concise manipulations on the context when complex hierarchies of elements (e.g. implementors of ContinuationInterceptor) are present
    * It unblocks possibility to implement suspendCancellableCoroutine in stdlib
    * Implementing proper polymorphic get and minusKey in AbstractCoroutineContextElement is impossible because it will introduce source-incompatible change
    * ContinuationInterceptor get and minusKey are adjusted in a completely backwards-compatible way
2020-01-24 16:17:14 +03:00
Anton Yalyshev 90fe1bb1ab Enable FUS for Code Completion in 1.3.70 2020-01-24 16:05:20 +03:00
Ilya Gorbunov 7bb504321c KT-15363 Rename expectedSize to capacity and edit docs 2020-01-24 15:28:35 +03:00
Ilya Gorbunov 14351446d7 KT-15363 Fix failing test: missing capacity parameter check in JS
Partially restore JVM map capacity implementation
2020-01-24 15:28:18 +03:00
Ilya Gorbunov 4aa7d45a5a KT-15363 Collection builders: improve tests and samples 2020-01-24 15:28:17 +03:00
Fleshgrinder bf9d3d87a6 KT-15363 Collection Builders
Added container builders for lists, sets, and maps.
The new experimental type inference only works for the simple builders
with a single generic type. The versions with nullability and the maps
still require explicit specification of the types. Obviously explicit
specification is required for all users who are not using the new
experimental inference. Improving the type inference is something that
should be done separately and many things – including these builders –
will benefit from it, however, this is not a blocker for these builders
in my opinion.
2020-01-24 15:28:17 +03:00
Ilya Goncharov fa811c731f [IDEA] Use withType instead of isAssignableFrom
#KT-36093 fixed
2020-01-24 15:25:25 +03:00
Ilya Goncharov 6dc9109736 [IDEA] Check assignable from task to KotlinTest class 2020-01-24 15:23:23 +03:00
Ilya Goncharov 6b860206bd [IDEA] Use GradleVersion fqn to use it in case when there is no import 2020-01-24 15:23:22 +03:00
Ilya Goncharov c3951d394b [IDEA] Preload KotlinTest class instead of loop finding 2020-01-24 15:23:22 +03:00
Ilya Goncharov 2c4cfd2fb8 [IDEA] Add check on gradle version not to broke Gradle older 4.0 2020-01-24 15:23:22 +03:00
Dmitriy Novozhilov 20ac606df4 Add js runtime to failing blackbox test 2020-01-24 14:17:44 +03:00
Shagen Ogandzhanian de07d3387b Update dukat dependency to 0.0.26 2020-01-24 12:09:05 +01:00
Alexander Udalov 2fca7f1a54 Add codegen tests for old behavior of null checks
#KT-22275
2020-01-24 11:56:28 +01:00