Commit Graph

46654 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy bf5f710f39 Parse integers with unsigned ('u') suffix 2018-06-04 18:19:34 +03:00
Mikhail Zarechenskiy e5958d228a Introduce WITH_UNSIGNED directive to use unsigned types in tests 2018-06-04 18:19:30 +03:00
Stanislav Erokhin 8f0b073c08 [NI] Prototype for SAM-conversion.
Supported:
- conversion in resolution parts. Also sam-with-receiver is supported automatically
- separate flag for kotlin function with java SAM as parameters

TODO:
- fix overload conflict error when function type is the same byte origin types is ordered
- consider case when parameter type is T, T <:> Runnable
- support vararg of Runnable

[NI] Turn off synthetic scope with SAM adapter functions if NI enabled
2018-06-04 12:21:56 +03:00
Stanislav Erokhin 4b8e95c243 Minor. Extract preparation for expected type to separate function 2018-06-04 12:21:52 +03:00
Stanislav Erokhin 232d069493 Minor. Use getExpectedType as util function for parameter type calculation
For almost all cases this change do nothing, because if parameter isn't
vararg, then both methods (FlatSignature.argumentValueType &
getExpectedType) return same value. Moreover if it is vararg parameter
and spread operator is not used, then results will be the same.
We can observe difference only when spread operator used
and when we compare two candidates corresponding parameters
for both spread arguments should be vararg parameters.
I.e. old way compares: Int vs String
new way compares: Array<out Int> vs Array<out String>.
2018-06-04 12:21:51 +03:00
Stanislav Erokhin 99e7823352 [NI] Disable test with disabled RefinedSamAdaptersPriority in NI
Such test has no ense in NI because NI it is LV = 1.4 and we cannot
repeat behaviour in 1.3 anyway, so I propose not even support old cases.
Also priority of LANGUAGE directive should be more then key enabled on
all tests -- also fixed.
2018-06-04 12:21:50 +03:00
Stanislav Erokhin b31d027aed [NI] Report deprecation for function from companion in NI. 2018-06-04 12:21:48 +03:00
Stanislav Erokhin 18b65e7bcf [NI] Update test data 2018-06-04 12:21:47 +03:00
Mikhael Bogdanov a4c4f048de Support compare for small primitives 2018-06-04 10:50:00 +02:00
Mikhael Bogdanov 340160de65 Don't generate setter accessors for vals 2018-06-04 10:49:59 +02:00
Mikhael Bogdanov aa8d71f6b9 Support synthetic flag 2018-06-04 10:49:59 +02:00
Mikhael Bogdanov 8767e0924b Support extensions in bridge lowering 2018-06-04 10:49:58 +02:00
Mikhael Bogdanov 5fa54dc854 Fix array constructors coercion type 2018-06-04 10:49:57 +02:00
Mikhael Bogdanov e58e05f9be Minor. Reformat 2018-06-04 10:49:57 +02:00
Mikhael Bogdanov 50d7e49211 Skip unmapped receiver in inner class lowering 2018-06-04 10:49:56 +02:00
Mikhael Bogdanov 5753f93a57 Support java synthetic properties in DependencyCollector 2018-06-04 10:49:56 +02:00
Alexey Sedunov 8198599ef5 Misc: Eliminate instances of IdeModifiableModelsProviderImpl or dispose them after use 2018-06-04 02:57:54 +03:00
Alexander Podkhalyuzin e3223ab6d8 Fixed grammar and words in pull request template 2018-06-03 17:01:08 +03:00
Valeriy Zhirnov e024a7c563 Provide template for pull requests
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-06-03 16:50:01 +03:00
Alexey Tsvetkov f7b32bdfa7 Refactor managing Gradle daemons for tests
Encapsulate daemon run count within DaemonRegistry to simplify reasoning
about the state.

Never count test process Gradle version as active Gradle process.

Fix the bug when daemon version hit max run count threshold
would be restarted every time after that.
2018-06-01 23:14:34 +03:00
Alexey Tsvetkov 0fd0eb9a18 Do not build release variant for Android Gradle test
This speeds up the test case significally. On my machine the time spent
in test case dropped from 1+ minute to 15 seconds.
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 87b053958b Make lint not fail on error in Android tests
It fails with meaningless (for us) errors, such as "target version 23
won't be accepted to play store soon".
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 3ccaae249a Move Android test from foo to com.example package
Otherwise the test `KotlinAndroid32GradleIT.testIncrementalCompile`
failed with Android resource linking failed error:
"attribute 'package' in <manifest> tag is not a valid Android package name: 'foo'."
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 44a845eca9 Avoid using bound class reference
Bound references require kotlin-reflect 1.1.x on runtime.
However old Gradle versions (e.g. 3.4) can leak 1.0.x reflect
into Gradle classloader, so getting bound reference fails on runtime
(in this case the plugin couldn't connect to the daemon).
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 42350ffb1a Fix applying subplugin from script
#KT-24497 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov 6eebcf7f18 Add test for subplugin in nested buildscript
KT-24653
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov f720501612 Implement fallback compiler search 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov 15a372b0eb Create compiler and plugin classpath configurations in Android plugin too 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov af8b0ffa6d Resolve compiler classpath using 'kotlinCompilerClasspath' configuration
#KT-24675 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov 6fe0829cf8 Remove scripting plugin from JVM compiler classpath
#KT-24559 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov db66bfd726 Pack scripting plugin into kotlin-scripting-embeddable for use in Gradle 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov dd731da6d1 Make 'kotlinCompilerPluginClasspath' non-transitive
Previous plugin resolution mechanism was only searching
for exact artifact without transitive dependencies.

The configuration allows resolving transitive dependencies,
but it resolves stdlib which fails because the compiler
loads plugins using parent last classloader.

Non-transitivity can be removed after parent last classloader is
removed.
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov 873de17056 Resolve compiler plugin classpath using 'kotlinCompilerPluginClasspath' configuration
#KT-24653 fixed
        #KT-24676 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov 0c21b21a88 Move subplugin tests to separate class 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov 1085abedcd Test scripting with Gradle 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov 0b22a3c67b Prevent starting multiple daemons from Gradle
#KT-24560 fixed
2018-06-01 23:13:36 +03:00
Alexey Sedunov 48b55edb03 Configuration: Add non-release repository to main Gradle buildfile
#KT-24725 Fixed
2018-06-01 21:36:39 +03:00
Alexey Sedunov b826e850fd Configuration: Enable dumb-mode alternative resolve when updating settings.gradle
#KT-24667 Fixed
2018-06-01 21:36:39 +03:00
Alexander Udalov 5478dabb38 Add Maven/Gradle usage examples to kotlinx-metadata-jvm ReadMe 2018-06-01 19:14:42 +02:00
Alexander Udalov adb129d244 Add ChangeLog for kotlinx-metadata-jvm 2018-06-01 19:14:42 +02:00
Ilya Chernikov 3171968efc Fix native-platform repo after it was suddenly moved in the gradle repo 2018-06-01 17:01:35 +02:00
Pavel V. Talanov dae8b12872 Mpp: fix production internals not visible from tests in platform modules
Caused by change in mpp resolve
Happened in platform modules that have expectedBy dependencies

#KT-24729 Fixed
2018-06-01 14:15:04 +02:00
Pavel V. Talanov 4279dc9c05 Minor: better name for generated test 2018-06-01 14:15:04 +02:00
Nikolay Krasko 91b86d7fba Remove explicit locks for accessing and creating cached values
Working with user data in cached value manager is already thread safe.
2018-06-01 12:08:48 +03:00
Nikolay Krasko cc04b72dfd Protect access to SLRUCache for scripts with a lock 2018-06-01 12:08:46 +03:00
Nikolay Krasko 6d7510a6f4 Minor: code cleanup in KotlinCacheServiceImpl.kt 2018-06-01 12:08:44 +03:00
Nikolay Krasko 1e5192bcff Fail with FileComparisonFailure in hierarchy tests 2018-06-01 12:08:43 +03:00
Nikolay Krasko a5593f1f31 Render entries with outer classifiers in call hierarchy (KT-22698)
#KT-22698 Fixed
2018-06-01 12:08:41 +03:00
Nikolay Krasko 496243c3ce Remove difference in nullable state for loadState() 2018-06-01 12:08:37 +03:00
Ilya Gorbunov f8217ef28f Extract subclasses of JvmMemberSignature sealed class to top-level
Use more specific subtypes of sealed class in visitors.
2018-06-01 06:43:48 +03:00