Commit Graph

87742 Commits

Author SHA1 Message Date
Ilya Goncharov 98bedf7eed [IR] More user-friendly compilation exceptions from lowerings and JS codegen
Merge-request: KT-MR-5004
2021-11-25 13:21:34 +00:00
Sergey Igushkin 844876a974 KT-49835: Exclude org.gradle.jvm.environment attribute from publishing
Not publishing this attribute fixes the consumers that don't set it.
Those may encounter either a conflict of Kotlin <= 1.5.31 rule on
{JVM, Android} -> Android vs Gradle rule
{standard-jvm, android} -> standard-jvm (causing disambiguation
failures). Or they may run Gradle < 7.0 which doesn't have
disambiguation rules for `org.gradle.jvm.environment` and therefore
treats it as an ordinary extra attribute, thus eventually preferring
variants which don't have it if no other disambiguation rule worked
(again causing disambiguation failures since some rules may prefer the
variants where this attribute *is* set).

Also set a "non-jvm" value of this attribute for non-JVM variants for
project-to-project dependencies in order to "align" them so that Gradle
doesn't prefer variants not marked with this attribute.

Extend the set of dependency resolution tests which check
compatibility of different kinds of Android & JVM consumers against
project and published library: add Kotlin 1.5.31 consumers, also check
consumption with different Gradle version than the one which did the
publication.

Issue #KT-49835
2021-11-25 13:10:27 +00:00
Stanislav Erokhin 8a0969156f Do not set "idea.plugins.compatible.build" -- fix plugin update issue
In the IDEA plugin update there are a code that used system property
"idea.plugins.compatible.build" to calculate the IDEA version
that will be sent to plugin marketplace to download last version of
the plugins. It seems like by some reason setupIdeaStandaloneExecution()
was called from the IDEA thread and because of that idea version was
calculated incorrectly and incorrect version of the plugins was
downloaded.

It is still unclear how the setupIdeaStandaloneExecution() could be
called from the IDEA, so added logging for that.

Relevant issue: MP-3702
Relevant code in the IDEA:
- ApplicationInfoImpl.getPluginsCompatibleBuildAsNumber
2021-11-25 15:50:37 +03:00
Aleksei.Cherepanov 6c28e9f4d4 Exclude :native:native.tests module from JPS build
It can be reverted after KT-46323 fix
2021-11-25 12:47:08 +00:00
Jinseong Jeon edc17a9d5f FIR LC: populate no-arg constructor if needed 2021-11-25 12:53:54 +01:00
Yahor Berdnikau d253f9ba0e Add test to validate incremental changes in compiler plugin.
If compiler plugin was recompiled incrementally, other projects in the
same build should pick it up and regenerate sources.

^KT-38570 Fixed
2021-11-25 12:45:29 +01:00
Dmitry Petrov 88f41d006a FIR2IR don't generate delegates for default interface members 2021-11-25 13:25:36 +03:00
Mads Ager 261482904c [FIR] Give external package fragments different module descriptors.
The inliner uses module descriptors to figure out if it needs to
regenerate objects.

We should avoid the use of descriptors in the inliner, but this
works as a first quick fix.
2021-11-25 13:20:31 +03:00
Yahor Berdnikau d205c376a7 Move JavaUpToDateIT tests into 'JvmGradlePluginTests'.
^KT-45745 In Progress
2021-11-25 11:03:14 +01:00
Yahor Berdnikau b6c11b544e Move kapt tests into 'OtherGradlePluginTests'.
^KT-45745 In Progress
2021-11-25 10:57:23 +01:00
Sergey Bogolepov 4c45f71edb [K/N] Fix KT-49876
Use llvm-ar on Windows host when producing Linux static library.
2021-11-25 09:28:03 +00:00
Roman Artemev 979ddacd8c [JS IR] Add and generate IC invalidation tests 2021-11-25 11:22:52 +03:00
Roman Artemev 85025b85b8 [JS IR] Implement runner to test IC invalidation
- add corresponding gradle task
2021-11-25 11:22:51 +03:00
Roman Artemev a01d9b77c3 [JS IR] Delegate invalidated files processing to the caller
This change is needed to test invalidation somehow
2021-11-25 11:22:45 +03:00
Roman Artemev 5b1ec561a9 [JS IR TESTS] Add ProjectModel parser to tests 2021-11-25 11:22:39 +03:00
Svyatoslav Scherbina ce0850be0a Native: fix watchos sample after 5020d5f 2021-11-25 08:09:41 +00:00
Pavel Punegov 0249b7ed74 [K/N] Stdlib: warnings as errors
Fix or suppress warnings in Native stdlib.
2021-11-25 08:08:38 +00:00
Igor Chevdar d3d21f072a [K/N][gradle] Added a test for KT-49248 2021-11-25 12:37:01 +05:00
Ilya Matveev ae128348ac [K/N][runtime] Provide API for stack-allocated stacktraces 2021-11-25 06:56:34 +00:00
Vladimir Dolzhenko 0495ba2495 avoid unnecessary collection copying 2021-11-25 02:22:44 +03:00
Vladimir Dolzhenko 42837415f0 Use nameFilter if all descriptors have not calculated
#KT-49821 Fixed
2021-11-25 02:22:40 +03:00
Quantum64 bfa3f89aeb Fix grammatical error in unsupported reflection exception 2021-11-24 22:43:18 +01:00
Ivan Kochurkin f046f2964b [FIR] Add PLATFORM_CLASS_MAPPED_TO_KOTLIN 2021-11-24 23:13:41 +03:00
Ivan Kochurkin 51b73bb6ae [FIR] Add REDUNDANT_NULLABLE diagnostics 2021-11-24 23:13:40 +03:00
Ivan Kochurkin 4caf3c5e83 [FIR] Add NOT_A_CLASS diagnostics 2021-11-24 23:13:40 +03:00
Ivan Kochurkin aff885bcd1 [FIR] Prevent potential exponent complexity in isValidTypeParameterFromOuterDeclaration 2021-11-24 23:13:39 +03:00
Ivan Kochurkin 3beb447e85 [FIR] Consider anonymous object declarations in classDeclarationsStack in transformers 2021-11-24 23:13:38 +03:00
Ivan Kochurkin b83ed7a6ed [FIR] Fix KtExpression.usedAsExpression for labeled expression 2021-11-24 23:13:37 +03:00
Ivan Kochurkin c92c77638a [FIR] Use CharSequence instead of String in getRawIdentifier to avoid extra string allocations 2021-11-24 23:13:36 +03:00
Ivan Kochurkin 2241887b8f [FIR] Drop RESOLVED_TO_UNDERSCORE_NAMED_CATCH_PARAMETER, always resolve to UNRESOLVED_REFERENCE 2021-11-24 23:13:35 +03:00
Nikolay Krasko 1150d51bf2 Revert dependencies needed for junit in kotlin-test-junit5
junit-jupiter-api-5.0.0.jar
junit-jupiter-engine-5.2.0.jar
2021-11-24 19:35:36 +03:00
Nikolay Krasko 4e806a6322 Bump junit-bom in our project 5.7.0 -> 5.8.1 and clean up old versions 2021-11-24 19:35:35 +03:00
Nikolay Krasko 7457d54360 Drop junit 3.8.1 dependency
junit:junit:3.8.1
  org.codehaus.plexus:plexus-container-default:1.0-alpha-9-stable-1
    org.apache.maven:maven-artifact-manager:2.2.0
      org.apache.maven:maven-project:2.2.0
        org.apache.maven.shared:maven-dependency-tree:2.1
          org.jetbrains.kotlin:jcabi-aether:1.0-dev-3
            :kotlin-script-util compileClasspath
2021-11-24 19:35:34 +03:00
Nikolay Krasko 84a189b6cc Update transitive dependency for kotlin-test - junit 4.12 -> 4.13.2 2021-11-24 19:35:33 +03:00
Nikolay Krasko 317b0b4495 Update junit dependency 4.12 -> 4.13.2 in tests 2021-11-24 19:35:32 +03:00
Nikolay Krasko af8faadca5 Update internal project junit dependency 4.12 -> 4.13.2 2021-11-24 19:35:31 +03:00
Glen K. Peterson 25d962b591 Bumped Junit dependency to fix CVE-2020-15250
Junit >= 4.7 and < 4.13.1 is vulnerable to https://nvd.nist.gov/vuln/detail/CVE-2020-15250   Sorry, I didn't build or test this change.
2021-11-24 19:35:30 +03:00
Nikolay Krasko 1cb456aa66 Cleanup some guava versions from verification-metadata.xml 2021-11-24 19:35:29 +03:00
Nikolay Krasko 5e04085592 Forgotten md5 values in verification-metadata.xml
^KTI-649 Fixed
2021-11-24 19:35:26 +03:00
Nikolay Krasko 58d7bd0baf Minor: clean up warnings in ScriptUtilIT 2021-11-24 19:35:24 +03:00
Nikolay Krasko af185ab870 Remove couple scripting tests commented for 2 years
There're similiar tests:
hello-resolve-junit-dynver.main.kts
hello-resolve-junit-dynver-error.main.kts
2021-11-24 19:35:23 +03:00
Yahor Berdnikau 9d686165fc Add test tag and task for KGP Android tests.
^KT-45747 In Progress
2021-11-24 17:20:24 +01:00
Yahor Berdnikau 2c7913627d Add test tag and task for KGP MPP tests.
^KT-45749 In Progress
2021-11-24 17:20:21 +01:00
Dmitry Petrov 91b1814b02 FIR2IR insert implicit cast on elvis RHS 2021-11-24 16:19:11 +00:00
Dmitry Petrov badfade2fd FIR2IR strip FlexibleNullability on IMPLICIT_NOTNULL 2021-11-24 16:19:10 +00:00
Dmitriy Novozhilov 196f087b54 Advance bootstrap to 1.6.20-dev-5822 2021-11-24 17:53:08 +03:00
Mikhail Glukhikh 0058d7e3d6 Add BB test for problem fixed with c2ab91d0 2021-11-24 15:30:33 +03:00
Ilya Goncharov 1481ad21f5 Enum implementing exported interface
[JS IR] Not export get instance enum function

[JS IR] Enum corresponding class is not considered in export

[JS IR] All enums are abstract and with private constructor

[JS IR] Any methods is left in d.ts

[JS IR] Make enum with declarations inside corresponding class

[JS IR] Export of interface through fake override

[JS IR] Include enum entry corresponding class members into export model

Merge-request: KT-MR-5031

^KT-49779 fixed
^KT-49773 fixed
2021-11-24 12:25:50 +00:00
Alexander Likhachev 4181429c7e [Gradle, JS] Add missing dependsOn on kotlinNpmCachesSetup task
It's already was not causing the build failure because of changes related to persisted yarn.lock but this fix is more reliable.
Also hidden `kotlinNpmCachesSetup` task by unsetting task group as it's not supposed to be executed directly and moreover direct execution makes no sense.
#KT-47215 Fixed
2021-11-24 14:49:28 +03:00
Nikolay Lunyak 8d647fa016 [FIR] KT-49265: Fix implicit visibility checks 2021-11-24 14:44:50 +03:00