Dmitry Petrov
a27c6b77cf
KT-43370 ACC_DEPRECATED on property accessors implemented by delegation
2020-11-17 18:16:37 +03:00
Dmitriy Novozhilov
986bdd1099
Build: replace usages of kotlin.build.useIR with kotlinBuildProperties.useIR
2020-11-17 18:14:09 +03:00
Dmitriy Novozhilov
c625a83ab5
Build: replace usages of idea.fir.plugin with kotlinBuildProperties.useFirIdeaPlugin
2020-11-17 18:14:08 +03:00
Dmitriy Novozhilov
1a3727a17c
Build: advance kotlin-build-gradle-plugin version in build files
2020-11-17 18:14:08 +03:00
Dmitriy Novozhilov
f531612aa4
Build: update kotlin-build-gradle-plugin version
2020-11-17 18:14:08 +03:00
Dmitriy Novozhilov
bab08c29be
Build: add several FIR flags to kotlin-build-gradle-plugin
2020-11-17 18:14:08 +03:00
Alexander Udalov
8160f579d3
Build: add useIR/useIRForLibraries to kotlin-build-gradle-plugin
2020-11-17 18:14:07 +03:00
Nikolay Krasko
e331e80b5d
Build: Temporary disable capturing inputs for tasks
...
We are suffering from the increasing build scan queue. Try to help
the server to overcome it.
2020-11-17 15:08:44 +03:00
Ivan Gavrilovic
33a0ec9b4f
KGP: Clean up configurations setup
...
KAPT classpath now uses extendsFrom in order to
resolve all configurations as a single graph.
Also, use Configuration.extendsFrom instead of
DependencyHandler.add that is being deprecated
in Gradle 6.7.
2020-11-17 10:44:15 +03:00
Ivan Gavrilovic
519aeeb644
KT-40140: Task configuration avoidance for Android projects
...
When adding Java sources to Kotlin task, avoid
force-configuring source-generating tasks in AGP.
Fixes https://youtrack.jetbrains.com/issue/KT-40140 .
Test: ConfigurationAvoidanceIT.testAndroidUnrelatedTaskNotConfigured
2020-11-17 10:43:48 +03:00
Yan Zhulanow
d376585821
IDE dependencies: Publish kotlin-coroutines-experimental-compat library
2020-11-17 10:29:21 +03:00
Vyacheslav Gerasimov
d7474bb2f7
Build: Use only @Exported & whitelisted classes for tools.jar api
...
This makes it stable between JDK vendors and versions
2020-11-17 01:21:00 +03:00
Alexander Likhachev
ac851523d8
[Gradle, MPP] Make KotlinCompileCommon task cc-compatible with warnings
...
Kotlin options are accessed via compilation. Compilation field is marked as transient and so not available after deserializing task from Gradle configuration cache.
Accessing 'isCompatibilityMetadataVariantEnabled' property via project in tasks 'onlyIf' causes Gradle to project instance serialization attempt that fails
(#KT-43141, #KT-43329) Fixed
2020-11-17 00:52:30 +03:00
Denis Zharkov
c6f46598ca
Set TARGET_BACKEND to JVM for failing irrelevant tests
2020-11-16 22:20:44 +03:00
Martin Petrov
68fdeaf865
Produce deterministic jar files.
...
This resets all timestamps present in jars produced by kotlinc.
This is important for build systems like bazel that rely on
deterministic outputs.
Before:
```
$ kotlinc ~/test.kt -d /tmp/a.jar
$ kotlinc ~/test.kt -d /tmp/b.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/a.jar
1ba022697317f796bd123fb4dc95418a18bcb51a /tmp/a.jar
6d2a2683470c24928f3fbd6768a4c57f55b0d196 /tmp/b.jar
$ unzip -l /tmp/a.jar
Archive: /tmp/a.jar
Length Date Time Name
--------- ---------- ----- ----
75 09-25-2020 16:48 META-INF/MANIFEST.MF
683 09-25-2020 16:48 TestKt.class
28 09-25-2020 16:48 META-INF/main.kotlin_module
--------- -------
786 3 files
```
After:
```
$ kotlinc ~/test.kt -d /tmp/a.jar
$ kotlinc ~/test.kt -d /tmp/b.jar
$ shasum /tmp/a.jar /tmp/b.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/a.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/b.jar
$ unzip -l /tmp/a.jar
Archive: /tmp/a.jar
Length Date Time Name
--------- ---------- ----- ----
75 12-31-1969 19:00 META-INF/MANIFEST.MF
590 12-31-1969 19:00 TestKt.class
36 12-31-1969 19:00 META-INF/main.kotlin_module
--------- -------
701 3 files
```
See https://github.com/JetBrains/kotlin/pull/3226 for a similar change.
2020-11-16 19:25:20 +01:00
Alexander Udalov
a3830b2611
JVM IR: copy corresponding property+annotations for DefaultImpls methods
...
Instead of using methodSignatureMapper which was an obsolete hack to
make accessor names "getFoo" instead of "<get-foo>".
In particular, this keeps the `@Deprecated` annotation on the
corresponding property, which results in ACC_DEPRECATED in codegen.
#KT-43326 Fixed
2020-11-16 19:15:49 +01:00
Alexander Udalov
5212ae6bbd
JVM IR: keep property annotations for inline class replacements
...
In particular, `@Deprecated` is not lost anymore and accessors of
deprecated property are generated with ACC_DEPRECATED just as in the old
backend.
#KT-43327 Fixed
2020-11-16 19:15:49 +01:00
Alexander Udalov
4ca60a2d7d
Fix warnings and some inspections in buildSrc
2020-11-16 19:15:43 +01:00
Denis Zharkov
22109e97d6
FIR: Unmute passing FirPsiCheckerTestGenerated.testJet53
2020-11-16 15:50:39 +03:00
Denis Zharkov
14305d1eba
FIR: Simplify callable references resolution
...
Also that fixes some bugs
2020-11-16 15:50:39 +03:00
Denis Zharkov
387fd895a6
FIR: Drop unused FirComposedSuperTypeRef
2020-11-16 15:50:39 +03:00
Denis Zharkov
ad35723f56
FIR: Simplify super-qualified calls resolution
2020-11-16 15:50:39 +03:00
Denis Zharkov
d4c7d4fc7c
FIR: Fix callable references resolution with stub receivers
...
Use stubReceiver as a receiver for fake calls
See issues KT-43358 KT-43359 KT-43378
2020-11-16 15:50:39 +03:00
Denis Zharkov
f97cc0b62d
FIR: Rework receivers processing in resolution
...
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00
Denis Zharkov
e2099a0307
FIR: Fix false-positive successful resolution of call with lambda receiver
...
Do not try to integrate/postpone receiver expression to the base system
Receiver should be resolved independently anyway
2020-11-16 15:50:39 +03:00
Denis Zharkov
396e799e5d
FIR: Fix resolution for type-alias based SAM
2020-11-16 15:50:39 +03:00
Denis Zharkov
4c9a4548f2
FIR: Fix overrides binding for Java inheritor
...
`overriddenMembers` contract requires original (non-enhanced) function
See other usages
Ignored tests have been working accidentally
^KT-43289 Open
2020-11-16 15:50:39 +03:00
Denis Zharkov
855af08f7c
Regenerate tests
2020-11-16 15:50:39 +03:00
Mikhail Glukhikh
4f7b45dfcc
Fir2IrTypeConverter: simplify captured type cache
2020-11-16 15:14:26 +03:00
Jinseong Jeon
cb77b76c0d
FIR2IR: convert recursive captured type properly
...
#KT-43346 Fixed
2020-11-16 15:14:24 +03:00
Mikhail Glukhikh
8ecf056927
[FIR2IR] Enter scope a bit earlier in createIrPropertyAccessor
2020-11-16 14:44:43 +03:00
Mikhail Glukhikh
59c86bcdc4
[FIR2IR] Provide more information for errors inside convertToIrSetCall
2020-11-16 14:44:42 +03:00
Mikhail Glukhikh
9de244515e
Upgrade coroutines: 1.3.7 -> 1.3.8
2020-11-16 14:29:58 +03:00
Dmitry Petrov
93f868fb96
KT-43196 member extension property can't be "primary" in inline class
2020-11-16 13:54:19 +03:00
Vladimir Dolzhenko
b6f958f856
Do not queue bg task under read action
...
Relates to #EA-218701
2020-11-16 09:25:08 +00:00
Dmitriy Dolovov
6e7b5a55b3
kotlinx-metadata: Don't write flags for absent property accessors
2020-11-13 22:54:34 +03:00
Dmitriy Novozhilov
a6cbae9719
[FIR] Rename FirErrors.SYNTAX_ERROR to SYNTAX
2020-11-13 16:19:30 +03:00
Dmitriy Novozhilov
2f5b231d50
[FIR] Add default renderers to FirDiagnosticFactories
2020-11-13 16:19:30 +03:00
Dmitriy Novozhilov
dc662efcf4
[FIR] Introduce FirDiagnosticRenderers
2020-11-13 16:19:29 +03:00
Dmitriy Novozhilov
ed0e5adce7
[FIR] Make FirAnalyzerFacade returns diagnostics grouped by fir file
2020-11-13 16:19:29 +03:00
Dmitriy Novozhilov
dabc259ae8
[FIR] Make diagnostics collectors returns List instead of Iterable
2020-11-13 16:19:29 +03:00
Dmitriy Novozhilov
20453bf0d8
[FIR] Get rid of FirSessionProvider.project property
2020-11-13 16:19:29 +03:00
Dmitriy Novozhilov
82a2ecfe14
[FIR] Cleanup creating sessions in CLI FIR compiler
2020-11-13 16:19:29 +03:00
Dmitriy Novozhilov
3aa8b09e31
[FIR] Add configurable language version settings to FirSessionFactories
2020-11-13 16:19:29 +03:00
Dmitry Petrov
5d76df6e1a
KT-43045 mangle function name for fake override with default impl
2020-11-13 16:15:29 +03:00
Mads Ager
1ecf5943ab
[JVM_IR] Determine correct type of empty varargs array.
...
When calling vararg methods with a generic vararg type without
passing explicit parameters, we have to allocate an empty array
of the right type. We failed to do so previously, as we did
not take the type arguments for the dispatch receiver into
account.
2020-11-13 12:13:53 +01:00
Georgy Bronnikov
ffc003c051
IR: copy IrProperty's attributes in deepCopyWithSymbols
2020-11-13 11:44:35 +03:00
Yan Zhulanow
7b98876475
Parcelize: Fix typo in diagnostic message (KT-43290)
2020-11-13 17:37:21 +09:00
Dmitriy Novozhilov
e3bfb9245c
[FIR] Rename nested directory with testdata to innerClasses
...
This is needed to avoid clashing name of generated test class (`Nested`)
with annotation @Nested from JUnit 5
2020-11-13 10:36:39 +03:00
Dmitriy Novozhilov
419f54259c
[TEST] Change semantics of CHECK_TYPE directive and update testdata
...
Previously helpers from checkType.kt was in special package, and
if directive was enabled then test runner (`AbstractDiagnosticTest`)
injected additional imports to test files and removed them after test
was completed.
It's very hard to support such behavior in new test infrastructure so
there was a decision about changing `CHECK_TYPE`:
1. All helpers from `checkType.kt` now stays in default package
2. `CHECK_TYPE` only adds `checkType.kt` to set of analyzed files
and don't modify their content
For test which are written in default package (most of tests actually)
there are no changes. On the other hand if there is a test where dev
want to use checkType functions in testfile with some package then he
should explicitly import functions which he needed (`checkSubtype`,
`checkType`, `_`)
2020-11-13 10:36:12 +03:00