Commit Graph

61064 Commits

Author SHA1 Message Date
Mikhail Glukhikh f949b48b4a [FIR] Swap priority of kotlin libraries / built-ins #KT-35948 Fixed 2020-01-27 13:21:54 +03:00
Dmitriy Dolovov c9b1c384e6 Clean-up: Split nativeLibrariesUtil.kt into separate files in idea-gradle 2020-01-27 17:09:21 +07:00
Dmitry Petrov ba1415d7d1 Minor: remove assertion in getCallableReferenceAdaptation 2020-01-27 12:30:59 +03:00
Ilya Chernikov 9623b0eedb Report error instead of assertion when property is used as operator
#KT-34857 fixed
2020-01-27 10:10:44 +01:00
Ilya Chernikov a1acb4afaf Return correct PSI expression for EmptyLabeledReturn
Fixes diagnostic reporting for appropriate constraint error
#kt-32792 fixed
2020-01-27 10:10:44 +01:00
Ilya Goncharov ca150005a8 [Gradle, JS] Fix Task Configuration Avoidance 2020-01-27 11:50:08 +03:00
Ilya Goncharov a2b774b186 [Gradle, JS] Distribution task depends on processResources 2020-01-27 11:50:08 +03:00
Toshiaki Kameyama 1ba8b52856 Constructor parameter is never used as a property: do not report if parameter is used as a reference
#KT-34686 Fixed
2020-01-27 11:33:50 +03:00
Toshiaki Kameyama 59f70a912a Convert to lambda reference: don't suggest when lambda is argument for 'suspend' function parameter
#KT-16907 Fixed
2020-01-27 11:31:16 +03:00
Mikhail Zarechenskiy b75ab5c832 Refactoring: SingleAbstractMethodUtils -> JavaSingleAbstractMethodUtils 2020-01-27 11:03:58 +03:00
Mikhail Zarechenskiy 0530f9ed1c Refactoring: generify and remove duplicated code 2020-01-27 11:03:57 +03:00
Mikhail Zarechenskiy 4e3c27c4ec Refactoring: move SamConversionOracle to core 2020-01-27 11:03:57 +03:00
Mikhail Zarechenskiy 6c4f5ea9c9 Minor: generify check for sam conversions 2020-01-27 11:03:56 +03:00
Mikhail Zarechenskiy 02387e77dd Refactoring: rename SamConversionTransformer -> SamConversionOracle 2020-01-27 11:03:56 +03:00
Mikhail Zarechenskiy 08f80ba15a Refactoring: remove useless method 2020-01-27 11:03:55 +03:00
Mikhail Zarechenskiy 00469712d1 [NI] Don't use only platform specific checks for FIC in inference 2020-01-27 11:03:55 +03:00
Mikhael Bogdanov 7e85674c61 Minor. Allow IR compilation of FIR and IR.TREE module 2020-01-27 08:49:15 +01:00
Mikhail Glukhikh 71d8b41bef [FIR] Remove unused utilities 2020-01-27 00:34:17 +03:00
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