Commit Graph

4468 Commits

Author SHA1 Message Date
Dmitry Savvinov 668bd209f2 Use -Xallow-kotlin-package while compiling common sources
K2MetadataCompiler doesn't perform explicit check of compilation of
'kotlin' package, thus stdlib build wasn't passing '-Xallow-kotlin-package'.

However, we have special hack for compiling stdlib with contracts: if
'-Xallow-kotlin-package' is passed, then allow compiling contracts for
custom functions. We have to do it this way, because we don't want
stdlib artifacts to be marked with pre-release flag, even though
contracts for custom functions are not enabled yet
(see eae9923dbe).

Therefore, it's crucial to pass -Xallow-kotlin-package properly for that
side-effect.
2018-07-09 18:57:58 +03:00
Alexey Tsvetkov 93e183c2e4 Test for KT-25051 2018-07-09 15:50:06 +03:00
Alexey Tsvetkov f735586819 Remove redundant test
`testMultiModuleICNonAndroidModuleIsChanged` already tested
android and non-android change
2018-07-09 15:50:05 +03:00
Alexey Tsvetkov 63b4302cea Always generate kotlin_module
#KT-25133 fixed
    #KT-25051 fixed
2018-07-09 15:48:11 +03:00
Denis Zharkov 4bf51af2fa Fix reference-public-api
It's necessary because of the changes in 3497880f203449121ea8035c49b792cc4dc53bd6
2018-07-09 15:27:19 +03:00
Roman Elizarov 3aa76c58fc Updated SuccessOrFailure class corresponding to KEEP-127 and docs. 2018-07-09 15:27:19 +03:00
Roman Elizarov 33f4a3fcbf Extracted BaseContinuationImpl 2018-07-09 15:27:19 +03:00
Roman Elizarov 38c17249b9 releaseInterceptedContinuation clarified and ref check in impl fixed 2018-07-09 15:27:19 +03:00
Roman Elizarov d33409ff8a Fixed boxing of SuccessOrFailure inside SafeContinuation impl 2018-07-09 15:27:19 +03:00
Roman Elizarov 0370fac0b6 Further design improvements for coroutines 1.3 APIs
* Documentation improvements and clarification
* Dropped legacy intrinsic functions
* Remove context parameter default from Continuation builder function
2018-07-09 15:27:19 +03:00
Roman Elizarov 719d45510a Continuation builder function 2018-07-09 15:27:19 +03:00
Roman Elizarov 0b17c619bc Fixed ContinuationImpl.intercepted 2018-07-09 15:27:19 +03:00
Roman Elizarov 7513557315 Unroll recursion in resumeWith
Fixes KT-18987
2018-07-09 15:27:19 +03:00
Roman Elizarov af9743709c Implement COROUTINE_SUSPENDED as a property with getter 2018-07-09 15:27:19 +03:00
Roman Elizarov aaabfa6382 Missing SinceKotlin declarations added for resume extensions 2018-07-09 15:27:19 +03:00
Roman Elizarov b06d626b21 releaseInterceptedContinuation and few other minor fixes 2018-07-09 15:27:19 +03:00
Roman Elizarov 8e2fae3322 More work on draft coroutines 1.3 ABI & API:
* SuspendFunction[01] interfaces removed, moved to RestrictedContinuationImpl
* validateContext introduced to check restricted coroutines
* Distinguish SuspendLambda as being lambda/coroutine and provide a separate
  toString implementation (draft) in its coroutine incarnation.
2018-07-09 15:27:19 +03:00
Roman Elizarov 8bbd78ca9a Draft Kotlin Coroutines 1.3 ABI & API:
* SuccessOrFailure inline class is introduced
* Continuation.resumeWith(SuccessOrFailure)
* createCoroutineUnintercepted
* [Restricted]ContinuationImpl as named suspending function base
* [Restricted]SuspendLambda as suspending lambda base
* SuspendFunction[01] interfaces for efficient createCoroutine
* Serializable coroutine classes
2018-07-09 15:27:19 +03:00
Alexander Udalov 959c2f4843 Get rid of split packages in descriptors, descriptors.jvm, deserialization
Also move some other files to related packages and reformat moved files
2018-07-06 14:08:35 +02:00
Ilya Gorbunov b5fabf3f72 Make unsigned types experimental (with warning if not opted-in) 2018-07-04 19:12:11 +03:00
Alexey Tsvetkov 39fc7cffe1 Temporarily ignore Kapt3WorkersAndroid32IT 2018-07-04 15:15:57 +03:00
Alexey Tsvetkov bab8c97c09 Allow overriding default Gradle version per test class 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov 05fa8b7451 Add SDK jars to compile classpath for Kapt Workers task 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov 3b18debee3 Test kapt with workers 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov efeea9d7d4 Update android tools versions in Gradle plugin tests 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov 357518be0d Remove projectDir input from KaptWithoutKotlincTask
It is redundant since the task would be restarted when project dir changes,
because paths of sources would also change
2018-07-04 14:55:42 +03:00
Alexey Tsvetkov 9b97108db4 Fix getting plugin version for kotlinKaptWorkerDependencies configuration
Previously the configuration would not work for non-android projects,
because it looked only at KotlinAndroidPluginWrapper for plugin version
2018-07-04 14:55:42 +03:00
Alexey Tsvetkov 43b7ffd823 Create kotlinKaptWorkerDependencies only once
#KT-25124 fixed
2018-07-04 14:55:42 +03:00
Alexander Udalov 50904d4216 Add JvmFunctionExtensionVisitor.visitEnd
#KT-25223 Fixed
2018-07-03 19:15:34 +02:00
Ilya Gorbunov cbc3480d9e Split common builtin companion tests from JVM-only tests
Remove duplicated tests from NumbersJVMTest.
2018-07-03 19:58:53 +03:00
Svyatoslav Kuzmich 83f8cfaa66 [JS IR BE] hashCode, toString, number conversion support 2018-07-03 19:51:58 +03:00
Ilya Gorbunov 3349976279 Make MIN_VALUE and MAX_VALUE of unsigned types actual constants 2018-07-03 03:52:18 +03:00
Ilya Gorbunov 7a208c3e01 Simplify unsigned array constructor functions 2018-07-03 03:52:18 +03:00
Ilya Gorbunov 615f57f2fc Compile unsigned types sourceset with 1.3 and annotate them with SinceKotlin("1.3") 2018-07-03 03:52:18 +03:00
Alexey Tsvetkov 8848d7a043 Remove groovy plugin from kotlin-gradle-plugin build script 2018-06-28 22:03:11 +03:00
Alexey Tsvetkov 22c1907167 Track project version in ":kotlin-gradle-plugin:processResources"
Before the change consecutive incremental builds with different project versions
produced kotlin-gradle-plugin with the same project.version in project.properties file
2018-06-28 22:03:11 +03:00
Alexander Udalov 8c8d0eefbb Relocate package org.jetbrains.kotlin in kotlinx-metadata-jvm
To prevent clashes in scenarios where it's used together with the Kotlin
compiler (e.g. in annotation processing)

 #KT-24945 Fixed
2018-06-28 14:39:53 +02:00
Nico Mandery 5c16633175 fix typos in documentation of JsQualifier annotation (#1733) 2018-06-27 19:34:27 +03:00
Alexander Udalov 8d124eb77f Minor, use array literal syntax in kotlin.Metadata 2018-06-27 12:20:03 +02:00
Sergey Igushkin dbd72ae53b Fix Android ap option providers as Kapt task nested inputs
1) Exclude the providers arguments from the kapt inputs, as the values
may contain absolute paths, may be output properties etc. The providers
should correctly annotate their inputs.

2) Fix the options passed to kapt as 'value=option' (leading to all the
options collapse into one with the null key), use 'key=option' instead
to make Kapt pass them as '-Aoption'.

Issue #KT-23866 Fixed
Issue #KT-25027 Fixed
2018-06-25 15:03:52 +03:00
Ilya Gorbunov 39cad033a3 Cleanup: remove deprecated configuration property
Currently it's useless because we don't override compilerJarFile anymore.
2018-06-24 17:27:57 +03:00
Vyacheslav Gerasimov 01db78d776 Build: Introduce Project extension properties for source sets 2018-06-22 21:42:30 +03:00
Leonid Startsev bef97d85af Respect version string in SubpluginArtifact to load compiler plugins
with versions different from compiler one
2018-06-22 21:13:34 +03:00
Alexey Tsvetkov 2065f8e6fe Fix inter-project IC for android->non-android dependency
#KT-24832 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov 9071a70a44 Avoid iterating jar inputs in inspectClassesForKotlinIC task
Jar's inputs can contain zipTrees in case of fat jars,
which can cause slow build
(Gradle unpacks them into temporary dir; that can be slow)

    #KT-24956 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov e38cafb1a2 Don't create build directory for task in getter
Since the property is public, it can be invoked from outside,
possibly trough other properties.
This can lead to unwanted side effects: we can create taskBuildDirectory,
because some other task reads the property in parallel with 'clean' task
in current project.
That's exactly what happened when we referenced the property from
'GradleCompilerRunner#buildModulesInfo'.

    #KT-24938 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov 03839f6861 Test: speed up integration test by not building release variant 2018-06-22 19:15:45 +03:00
Alexey Tsvetkov 433e742d73 Fix location mapping test on Windows 2018-06-22 19:15:45 +03:00
Ilya Gorbunov 6d027bbbfc Remove state from parts of multifile classes
Split COROUTINE_SUSPENDED marker to expect and actual because Kotlin/JS backend
expects it to be property without getter.

Update EXPECTED_REACHABLE_NODES in JS test data.

#KT-24986 Fixed
2018-06-22 11:35:05 +03:00
Anton Bannykh 6df9919eba JS IR: add DefaultContructorMarker to the runtime 2018-06-21 13:27:17 +03:00