Commit Graph

2444 Commits

Author SHA1 Message Date
Kevin Bierhoff c1360c5a7a Uast: resolve reified callees from classpath (#4013, KT-41279) 2021-01-14 20:29:03 +03:00
Alexander Udalov 3be62dfc89 Build: enable -Werror in stdlib/core/compiler/plugins modules
Exclude modules where there are still warnings in an explicitly declared
variable `tasksWithWarnings`.

Also remove "-progressive" from compiler arguments in modules which are
built with non-latest language version, as the warning about that leads
to an error with -Werror.
2021-01-13 19:34:24 +01:00
Alexander Udalov 2a7a297399 Suppress "runtime JAR files version mismatch" warnings in some plugins 2021-01-13 19:34:24 +01:00
Alexander Udalov 0d8f909bda Use ObsoleteTestInfrastructure instead of Deprecated in black box tests 2021-01-13 19:34:24 +01:00
Alexander Udalov 221f44da5f Fix warnings in stdlib/compiler/plugins/test code 2021-01-13 19:18:20 +01:00
Alexander Udalov b3d85e656e Fix warnings after update to 202 platform
#KT-44069 Fixed
2021-01-13 19:17:22 +01:00
Alexander Udalov d101f1b3a6 Minor, fix compiler warnings in kotlin-serialization-compiler 2021-01-13 19:17:21 +01:00
Ivan Gavrilovic dfdd107fc0 Update KAPT stubs for tests
Update expected outputs so they match
the new sorting rules.
2021-01-13 22:49:09 +09:00
Ivan Gavrilovic 3b2986f069 Apply consistent sorting for elements from the same position
There could be multiple elements originating from the same
position in the source file, so make sure to use name+desc to
sort those.
2021-01-13 22:49:09 +09:00
Ivan Gavrilovic ecc0eee3cf KT-44130: Sort fields and methods in generated stubs
Use the position in the source file if possible, and
only if the members are coming from other source files,
use their name and descriptor. This is necessary in order
to ensure deterministic output in clean and incremental
runs, while preserving the order of members in the sources.
2021-01-13 22:49:09 +09:00
Ivan Gavrilovic a320152a03 Revert "Sort class members to ensure deterministic builds"
This reverts commit 4bf63a9539.
2021-01-13 22:49:09 +09:00
Dmitriy Novozhilov 3c2079c926 [Test] Compute target backend in test generator automatically using reflection 2021-01-12 18:35:16 +03:00
Dmitriy Novozhilov 1e67702128 [Test] Introduce opt in @ObsoleteTestInfrastructure for migrating tests to new infrastructure 2021-01-11 14:19:10 +03:00
Jinseong Jeon 7cc06489dd IR: move enum value array initialization out of <clinit>
#KT-44192 Fixed
2021-01-07 23:00:37 +01:00
Ilya Chernikov 9a7d1948a7 Implement support for -Xdefault-script-extension cli option 2021-01-07 10:37:22 +01:00
Ilya Chernikov 1bd6cc823c Fix provided properties access generation
The presense of accessors in the descriptor led to the wrong code
generation in some cases.
#KT-43176 fixed
2021-01-07 10:37:20 +01:00
Alexander Udalov ed9a0e514d Regenerate tests and fir-tree 2021-01-03 14:53:41 +01:00
Nikolay Krasko 133e39b783 Advance snapshot version 1.4.255 -> 1.5.255 (KTI-421)
#KTI-421 Fixed
2020-12-31 15:49:06 +03:00
Zalim Bashorov 0372dae3ce [JS scripting] Remove usages of descriptor based APIs and proper support for callable references 2020-12-28 18:53:53 +03:00
Alexander Udalov 77a9d14f93 Capitalize/decapitalize only ASCII characters across project
Use {de,}capitalizeAsciiOnly and to{Lower,Upper}CaseAsciiOnly where
possible, and stdlib's functions with Locale.US everywhere else.

Otherwise, if the default system locale is Turkish, the capital latin
letter "I" is transformed in toLowerCase to "ı" (see
https://github.com/JetBrains/kotlin/blob/66bc142f92085047a1ca64f9a291f0496e33dd98/libraries/stdlib/jvm/test/text/StringJVMTest.kt#L119),
which for example breaks the codegen for `intArrayOf` in
KT-25400/KT-43405.

Similarly, lower case latin letter "i" is transformed to "İ".

 #KT-13631 Fixed
 #KT-25400 Fixed
 #KT-43405 Fixed
2020-12-28 16:10:30 +01:00
Zalim Bashorov 7c5ea414b7 [JS IR] Use mappedNames in NameTable only for REPL
And throw exception for unsupported types in mapToKey
2020-12-24 20:03:21 +03:00
Dmitriy Novozhilov ef3d966d53 [Test] Fix dependencies in task [JPS] Generate All Tests 2020-12-24 14:58:04 +03:00
Georgy Bronnikov d714adacae IR: removing WrappedDescriptors from symbols 2020-12-23 18:50:51 +03:00
Dmitriy Novozhilov 537e4f0bb4 [Test] Move existing fir tests on old infrastructure to :legacy-fir-tests module 2020-12-21 18:34:55 +03:00
Dmitriy Novozhilov 1f258c28fc [Test] Extract main compiler test generator to separate project
This is needed because now we have different tests modules with different
  test frameworks (JUnit3 and JUnit5) which has no dependencies between
  each other. So for keeping all test generation config in one place
  we need module which may rely on all independent test modules
2020-12-21 18:34:54 +03:00
Ilya Chernikov 65cf941b9b Remove assertion about dispatch receiver in scripts
#KT-42530 fixed
2020-12-21 09:43:44 +01:00
Alexander Udalov 691b20a685 JVM IR, FIR: set IR configuration key to true if FIR is enabled 2020-12-20 23:14:41 +01:00
Leonid Startsev a5ddb1fdf1 Update error about unsupported inline classes
Remove unused declarations
2020-12-19 20:34:45 +03:00
Leonid Startsev 272273baed Support serializable inline classes in IR plugin
as well as standard unsigned types.
2020-12-19 20:34:45 +03:00
Leonid Startsev 631a72d14a Support old serialization runtime versions
(where exception signatures weren't changed)

after f671c27f27
2020-12-19 20:34:11 +03:00
Leonid Startsev f671c27f27 Adapt serialization exceptions constructor calls in legacy JS
to signature change

(see https://github.com/Kotlin/kotlinx.serialization/pull/1054
and commit eea4ff33a0)
2020-12-19 19:18:15 +03:00
Leonid Startsev 18e7a1485c Additional fix for Compose:
directly search for fields in IR class w/o using the symbol table.
Because Compose copies whole IR, fields got referenced incorrectly.
In the end, bytecode generator thinks that this is a field from other
class and creates a synthetic setter, which is prohibited in Java 9+
(Update to non-static final field ... attempted from a different method than <init>)
2020-12-19 19:18:14 +03:00
Dmitriy Novozhilov bc7e18fb8a [TEST] Regenerate tests after previous commit 2020-12-16 19:52:28 +03:00
Dmitriy Novozhilov d7224ad63e [Build] Add generating and running new compiler tests to gradle 2020-12-16 19:52:23 +03:00
Dmitriy Novozhilov c8f3a4802e [TEST] Introduce test-infrastructure-utils module and extract common test utilities here 2020-12-16 19:52:22 +03:00
Dmitriy Novozhilov 23c088afd6 [TEST-GEN] Reorganize package structure in :generators:test-generator module 2020-12-16 19:52:20 +03:00
Denis.Zharkov 2d8a8d252b Add 201 bunch files for JavaClass implementations
In 201, there's an old ASM version and PSI doesn't have record-related API
2020-12-09 16:47:25 +03:00
Denis.Zharkov 26d525fa3c Prepare ClassBuilder for record components
^KT-43677 In Progress
2020-12-09 16:29:04 +03:00
Ivan Gavrilovic 078aa18479 Fix KAPT cli tests on windows
- Fix line separator issue
- Always quote args with delimiters (=, :)
- fix one of args files by removing obsolete stdlib reference
- Fix kotlinc.bat to ensure lazy evaluation of additional classpath
2020-12-07 12:36:59 +01:00
Alexander Udalov c87edc44f3 Fix compilation error in :noarg-ide-plugin
Was overlooked in a06bffc4b9.
2020-12-05 00:59:18 +01:00
Alexander Udalov 25c228297a JVM IR: support noarg compiler plugin
#KT-41265 Fixed
2020-12-04 22:12:58 +01:00
Alexander Udalov a06bffc4b9 Noarg: prohibit noarg for inner and local classes
Report warning if old JVM backend is used, and error for JVM IR, which
is supposed to be enabled as default in the next Kotlin release.

 #KT-43725 Fixed
2020-12-04 22:12:58 +01:00
Alexander Udalov a343fffe9e Noarg: somewhat refactor tests
Extract method that registers components, merge abstract test classes
into one file.
2020-12-04 22:12:57 +01:00
Mads Ager 5d9e86863a [IR] Make isHidden and isAssignable explicit on IrValueParameter.
There were a couple of places where they were confused and
isAssignable was passed as a positional parameter in the position
of isHidden.
2020-12-04 17:04:45 +01:00
Ivan Gavrilovic 11673bd09c KAPT: add tests for processed types, remove dead code, simplify logic
Add integration test which checks if only types can be
reprocessed in an incremental round. Also, remove unused
`invalidateTypesForFiles` method.

Furthermore, clarify that types that are reprocessed
(i.e types from .class files) are not necessarily
aggregating types, but simply types that should be reprocessed.

Test: KaptIncrementalWithIsolatingApt.testClasspathChangesCauseTypesToBeReprocessed
2020-12-02 16:55:50 +01:00
Ivan Gavrilovic 08a2b47c77 Incremental KAPT: fix typo and do check processed sources on
clean build
2020-12-02 16:55:49 +01:00
Ivan Gavrilovic 05e47da458 Incremental KAPT: simplify impacted types computation
Process aggregating types first, and when computing impacted types
compute isolating generated impacted by classpath changes first.
2020-12-02 16:55:49 +01:00
Ivan Gavrilovic c7e5beece5 Use types are origins for incremental KAPT and track generated source
This change introduces tracking of generated sources structure in order
to e.g track classpath changes impacting generated sources. This fixes KT-42182.

Also, origin tracking for isolating processors is now using types, allowing
for origin elements from classpath. This fixes KT-34340. However, classpath
origin is used only to invalidate generated files when the type changes and
processing will not be requested for that type. This is in line with the
incap spec.
2020-12-02 16:55:49 +01:00
Mikhael Bogdanov ad579de328 Don't run KaptPathsTest.testSymbolicLinks test on Windows 2020-11-30 12:17:00 +01:00
Mikhael Bogdanov 8a00470b40 Enable kotlin-annotation-processing-base tests on TC 2020-11-30 10:06:22 +01:00