Commit Graph

58254 Commits

Author SHA1 Message Date
Ivan Gavrilovic fbde7e47e9 KT-33503: Avoid analyzing module-info.class in KAPT classpath
When analyzing classpath changes for incremental KAPT, avoid
analyzing module-info.class files.

Test: ClasspathAnalyzerTest
2019-10-13 15:14:40 +09:00
Ilya Kirillov 1ec620b753 New J2K: fix SOE in inference processing for star-projection as type argument
#KT-33942 fixed
#KT-33941 fixed
2019-10-12 15:28:03 +03:00
Ilya Kirillov b350515237 New J2K: make post-processing aware of other files which are being converted
Before post-processing was able to handle only one converting file at once
So, some conversions (like (field, getter, setter) to Kotlin property)
was not able to work when converting class hierarchy was split into
multiple files.
Also, inferring nullability for a set of files was broken

#KT-19569 fixed
#KT-34266 fixed
#KT-32518 fixed
2019-10-12 12:50:34 +03:00
Ilya Kirillov 999918d499 New J2K: add multi-file conversion tests from old j2k 2019-10-12 12:50:34 +03:00
Ilya Kirillov f951ed9dba New J2K: introduce external code processing for new J2K
It will update usages from files not in conversion scope to a valid ones:
1. When converting (field, getter, setter) triple from Java to a Kotlin property,
   it will:
      1. Update every usage of getter/setter in Java/Kotlin code to a usage of actual property
      2. If property is used in Java directly then will add @JvmField to it
2. When converting static method or static field without getter and setter, which has Java usages then add @JvmStatic to it

#KT-34164 fixed
2019-10-12 12:50:33 +03:00
Ilya Kirillov 7535c2f249 New J2K: fix expose internal/private type errors 2019-10-12 12:50:33 +03:00
Ilya Kirillov d0f0b9e355 New J2K: do not allow field and method declarations to be internal
For internal members new names are generated,
So, references to them from Java will be broken
2019-10-12 12:50:32 +03:00
Alexey Trilis b30537de0e Generate Kotlin/JS stdlib dependencies via dukat 2019-10-12 01:39:25 +02:00
Mikhail Zarechenskiy 83bb07e5ac Revert "Fix performance issue for case when there are a lot of warnings in file"
This reverts commit 3d8e5c4f8e.

 Temporarily reverting this commit due to new flaky tests
2019-10-12 00:44:00 +03:00
Sergey Igushkin c13f55f0ad Cache PropertiesProvider, read the local.properties file lazily
Issue #KT-33980 Fixed
2019-10-11 21:32:20 +03:00
Sergey Igushkin d0604ffde8 Fix requiresVisibilityOf in the Gradle plugin (KT-34312)
* Fix adding new items (which was untested, as the logic was only tested
 by unit tests)

* Exclude the source set's dependsOn transitive closure from the
requiresVisibilityOf checks (i.e. these source sets are considered
visible)

* Fix minor issues in the `UnsatisfiedSourceSetVisibilityException`
message

* Add `requiresVisibilityOf` to integration tests

Issue #KT-34312 Fixed
2019-10-11 21:32:08 +03:00
Kirill Shmakov d7a48e7229 Add Native Debug plugin advertising 2019-10-11 19:21:15 +03:00
Mikhail Zarechenskiy 3d8e5c4f8e Fix performance issue for case when there are a lot of warnings in file
There was a problem with `reportDiagnosticOnce` method which was
 called, for example, to report diagnostics about experimentalities. It
 was crucial for code as in the issue (KT-34204).

 The whole complexity was "count of experimental diagnostics" multiply
 "count of all diagnostics" multiply very large constant. Almost on
 each `reportDiagnosticOnce` method `readonlyView()` was called which
 in turn called computation of cache. During cache computation we were
 iterating through the all diagnostics and also were using
 KotlinSuppressCache, which is not very fast.

 #KT-34204 Fixed
2019-10-11 18:47:54 +03:00
Mikhail Zarechenskiy 71cb5e07db Minor, don't recreate Set with the same values 2019-10-11 18:47:54 +03:00
Ilya Chernikov 1f46e60153 Implement samWithReceiver support for scripts when ...
it configured from script compilation configuration
#KT-34294 fixed
2019-10-11 17:43:50 +02:00
Ilya Chernikov 2568804eaa Instruct platform code to use NIO2 always
since we're not always use jna (means that we can get warnings about missing jna libs)
and according to the IDEA team, NIO2 works well enough to rely on it
2019-10-11 17:43:49 +02:00
Ilya Chernikov d51291b187 [minor] Fix file pattern matching test and converting paths to universal separator on calling the walking function 2019-10-11 17:43:48 +02:00
Ilya Matveev b7f9694f3a Fat frameworks: Run tests only on MacOS 2019-10-11 18:28:19 +03:00
Ilya Matveev 919c09d849 Fat frameworks: Support for watchOS and tvOS
Issue #KT-34259 fixed
2019-10-11 18:28:18 +03:00
Ilya Matveev 37e828d4aa Gradle, native: Disable watchOS x64
Currently a 64-bit simulator for watchOS is not available so
we disable this target.
2019-10-11 18:28:18 +03:00
Ilya Matveev 02504767aa Fat frameworks: Add tests 2019-10-11 18:28:18 +03:00
Ilya Matveev 57b111cbe8 Fat frameworks: Don't add simulators into CFBundleSupportedPlatforms
Issue #KT-32223 fixed
2019-10-11 18:28:18 +03:00
Ilya Goncharov d978f9671e [Gradle, JS] Not consider mocha default arguments
#KT-33747 fixed
2019-10-11 17:51:02 +03:00
Ilya Goncharov 1fad109fc1 [Gradle, JS] Deprecate useNodeJs for compatibility 2019-10-11 17:51:02 +03:00
Ilya Goncharov 5957bda40c [Gradle, JS] Remove redundant NodeJs runner 2019-10-11 17:51:02 +03:00
Ilya Goncharov 7cde993b43 [Gradle, JS] Detect adapter automatically, not depends on JasmineLike 2019-10-11 17:51:02 +03:00
Ilya Goncharov 55fb9be7f6 [Gradle, JS] Remove copypaste for karma and nodejs test adapters 2019-10-11 17:51:02 +03:00
Ilya Goncharov cb096db6be [Gradle, JS] useMocha by default 2019-10-11 17:51:02 +03:00
Ilya Goncharov 5c3c196f8e [Gradle, JS] Return result of testing function
- It is useful for async testing (Promise returning)
2019-10-11 17:51:02 +03:00
Ilya Goncharov 3b29112885 [Gradle, JS] Remove redundant related with JS test run 2019-10-11 17:51:02 +03:00
Ilya Goncharov 287351a4c2 [Gradle, JS] Only one sender of team city stdOut messages
- NodeJS and Browser tests should use one code to send TeamCity messages
2019-10-11 17:51:02 +03:00
Ilya Goncharov a4c761aa33 Use team city messages for mocha test output 2019-10-11 17:51:02 +03:00
Ilya Goncharov 07e4b1f3de Migrate filtering adapter on mocha's initial adapter 2019-10-11 17:51:02 +03:00
Ilya Matveev 9ab2b928bc Gradle, native: Add a DSL shortcut for iOS, watchsOS and tvOS
This patch adds a group of shortcut DSL methods allowing a user to
create simulator and device targets for Apple platforms along with
corresponding common source set(s) in one command. iOS, tvOS and
watchOS targets are supported.

Issue #KT-33856 fixed
2019-10-11 17:40:57 +03:00
Ilya Matveev 912690517f Update K/N version: 1.3.60-eap-12915 2019-10-11 17:40:56 +03:00
Alexander Gorshenev f18a3f7fa9 Several more librry resolver tweaks.
Made library builder a member function.
Moved resolverByName() back to Native for now
2019-10-11 17:02:06 +03:00
Alexander Gorshenev 55805ddeb8 JS search path resolver with attributes.
Warn on inclusion of klibs with the same name in manifest
2019-10-11 17:02:06 +03:00
pyos bc4be53569 JVM: generate $assertionsDisabled before inlining the node
This fixes the problem where compiling a class initializer that contains
a call to an `assert`ing function in a separate module causes the
assertion to always be enabled (i.e. the attached test used to fail in
CompileKotlinAgainstInlineKotlin mode).
2019-10-11 14:54:52 +03:00
Leonid Startsev d8ad0ec43a Do not add synthetic deserialization constructor if .deserialize method is customized
Otherwise, there was an added descriptor without generated IR on Native
2019-10-11 14:24:51 +03:00
Leonid Startsev 1ed4930a2e Fix failing tests after 395d595b 2019-10-11 14:24:51 +03:00
Nikolay Krasko 93c91862f1 Fix debugger tests compilation in 193 after the big refactoring 2019-10-11 14:06:47 +03:00
Anton Bannykh 82e8bcfca9 Proto: update the workaround which reduces memory allocations 2019-10-11 13:58:22 +03:00
Georgy Bronnikov 1abdcf3f57 JVM_IR: support function references with default parameters 2019-10-11 13:30:30 +03:00
Natalia Selezneva 1a7f1dff10 Simplify scratch test without runtime to avoid exception form resolver
Create an issue that caused failure of the original test
^KT-34233
2019-10-11 12:33:17 +03:00
Natalia Selezneva 768200266a Add idea-android module to dependencies of scripting-support because it is needed for tests 2019-10-11 12:31:42 +03:00
Ilya Goncharov 18b287def5 Fix license information for js modules 2019-10-11 12:23:20 +03:00
Dmitriy Novozhilov 29cda7cb24 [FIR] Always use LF line endings in generated fir tree 2019-10-11 10:27:23 +03:00
Dmitriy Novozhilov 8e4e7c4a11 [FIR] Configure IC for fir tree generation task 2019-10-11 10:27:23 +03:00
Ilya Chernikov 9bf46cf435 Fix filename pattern building under Windows 2019-10-11 08:13:05 +02:00
Dmitriy Novozhilov dc1874af3c [FIR] Add empty line at the end of generated fir tree files 2019-10-10 20:45:21 +03:00