Commit Graph

92073 Commits

Author SHA1 Message Date
Ilya Gorbunov 4598552e46 Promote Regex.matchAt and matchesAt to Stable #KT-51470 2022-04-12 15:03:37 +00:00
Ilya Goncharov d62b01ef41 [JS] Update lock files
Merge-request: KT-MR-6073
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-04-12 15:02:21 +00:00
Yahor Berdnikau 2c252f9231 Print in info level logs applied plugin variant
^KT-49227 Fixed
2022-04-12 14:48:49 +00:00
Yahor Berdnikau e8774448ee Allow to register specific variant implementations
Such way those implementations are accessible from the common code.
 To avoid putting stub implementations in every variant, it is also
 possible to add default implementation from the common code if variant
 hasn't register own.

 As an example of usage, support for removed in Gradle 7.0 'maven' plugin
 was moved into 'main' variant (Gradle 6.7.1 - 6.9.3).

 ^KT-49227 In Progress
2022-04-12 14:48:48 +00:00
Yahor Berdnikau 78cc2365b0 Fix gradle api dependency version in variants
Common SourceSet was forcing gradle api version to be the same
in all plugin variants via 'extendsFrom(..)'.

^KT-49227 In Progress
2022-04-12 14:48:48 +00:00
Mads Ager 1e444e0451 [JVM IR] Limit local variables in do-while conditions.
Locals introduced in the body of a do-while loop are not
necessarily live at the do-while condition. For example,
if there is a continue in the body before the declaration:

    do {
      if (shouldContinue(x))
        continue
      val y = 32  // not always defined in the condition
      doSomething(y)
    } while (x < 2)

For locals referenced in the condition such code is rejected
by the frontend because a local referenced in the condition
must be always defined when you get there.

However, locals that are not used in the condition were always
put in the local variable table. This leads to invalid locals
information which can trip of debuggers and other build tools
such as the D8 dexer.

This patch only puts in locals information for locals actually
referenced in the local variable table for the condition.

^Fixes KT-51754
2022-04-12 15:47:14 +02:00
Roman Golyshev 32fa2fc476 [FIR] Resolve receiver in qualified expressions with no selector
In qualified expression like `foo().`, selector expression is null.
Because of that the whole expression was marked as an error FIR
expression, and `foo()` part was not resolved at all (including
arguments and everything else).

This commit fixes the problem by providing receiver's FIR expression
as an underlying expression for error FIR expression. That way
it will be seen by all resolve transformers and will be successfully
resolved.

^KTIJ-21484 Fixed
2022-04-12 10:55:12 +00:00
Pavel Punegov 3b53d8694f [K/N][build] Fix build version property usage 2022-04-12 08:33:31 +00:00
Yahor Berdnikau 85689f4eb3 Fix jvmTarget was not set on reusing configuration cache.
When project has toolchain configured and on reusing configuration
cache, 'filteredMapArguments' input was calculated without actual
value of `jvmTarget` provided by toolchain leading to non-UP-TO-DATE
KotlinCompile task state.

^KT-51937 Fixed
2022-04-12 08:32:30 +00:00
Svyatoslav Scherbina 1dae506198 Mention concurrent sweep in kotlin-native/NEW_MM.md 2022-04-12 07:11:21 +00:00
Svyatoslav Scherbina 956cd1ebde Update kotlin-native/NEW_MM.md to Kotlin 1.6.20 and Ktor 2.0.0
Also use "memory manager" instead of "memory model", since this is more correct and matches other documents.

Co-authored-by: Sergey Bogolepov <sergey.bogolepov@jetbrains.com>
2022-04-12 07:10:46 +00:00
konstantin.tskhovrebov c82b1d3e33 KT-51884 Skip XCFramework and FatFramework tasks on non-mac machines. 2022-04-12 06:52:46 +00:00
Nikolay Krasko 8bc29a3011 Apply reproducible-build-maven-plugin to fix ordering in resulting jars
Plugin https://github.com/Zlika/reproducible-build-maven-plugin has
an Apache 2-0 licence.

There's an explicit mentioning that ZIP and
JAR entries ordering `depends on file system order` at
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318

kotlin-annotation-processing-maven-{version}-sources.jar
kotlin-archetype-js-{version}-sources.jar
kotlin-archetype-jvm-{version}-sources.jar
kotlin-maven-allopen-{version}-sources.jar and other jars were affected.

KTI-729
2022-04-11 21:38:04 +00:00
pyos d61e7db937 JVM_IR: add a test for when(enum) binary compatibility 2022-04-11 22:50:07 +02:00
pyos 518a6dec8c JVM_IR: ignore NoSuchFieldError when constructing enum mappings
^KT-30473 Fixed
^KT-38637 Fixed
2022-04-11 22:50:07 +02:00
Artem Kobzar fc4c745cc4 chore: remove usage of globalscope declaration. 2022-04-11 20:33:20 +00:00
Artem Kobzar f142599243 feat: add limited support of comments inside js call. 2022-04-11 17:03:28 +00:00
Mads Ager bfe8c3b263 Use method entry line number for synthetic code in suspend fun.
If no line number is emitted, the line number of the last line
in the suspend function is used. That combined with the IntelliJ
debuggers handling of breakpoint setting and the D8 dexers
reordering of blocks can lead to cases where breakpoints on
the last line of a suspend function are never hit.

See https://youtrack.jetbrains.com/issue/KT-51936 for details.

^Fixed KT-51936
2022-04-11 17:00:40 +00:00
pyos a07e21d913 JVM: streamline handling of tail-call suspend functions
Just see if every suspend call is followed only by safe instructions or
returns, then insert a suspension point check if there isn't a direct
return.

The first part of this is equivalent to the old implementation, just
refactored. The second part generates strictly more checks; see, for
example, the fixed test, in which the previous implementation failed to
insert a check before a CHECKCAST.

^KT-51818 Fixed
2022-04-11 17:00:26 +00:00
Artem Kobzar 97fc97e63d chore: add miss internal modifier to internal annotation. 2022-04-11 14:25:49 +00:00
Artem Kobzar 7d7490eaa7 chore: fixe rest of comments tests. 2022-04-11 14:25:49 +00:00
Artem Kobzar f5e7b9886c fix: directive and line test. 2022-04-11 14:25:48 +00:00
Artem Kobzar e68ee4053e fix: add semicolon to pattern for parsing directive arguments. 2022-04-11 14:25:48 +00:00
Artem Kobzar 4e8082ad3a fix: arguments pattern for assertion directives. 2022-04-11 14:25:48 +00:00
Artem Kobzar 86df391cab fix: function body comments. 2022-04-11 14:25:47 +00:00
Artem Kobzar 672561b847 chore: remove unused import. 2022-04-11 14:25:47 +00:00
Artem Kobzar 45e3c94a8b feat: add limited support of comments inside js call. 2022-04-11 14:25:46 +00:00
Ilmir Usmanov 6e30ce2763 FE: Make synchronized suspend functions and lambdas error in 1.8
#KT-27333 Fixed
2022-04-11 12:02:30 +00:00
Ilmir Usmanov f473998e8b FIR: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
#KT-49264
2022-04-11 12:02:29 +00:00
Ilmir Usmanov f75a8109d2 FE 1.0: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
#KT-49264 Fixed
2022-04-11 12:02:28 +00:00
Ilya Goncharov 1c2604a95e rra/ilgonmic/dry-run-wo-output
[Gradle, JS] Use assertOutputDoesNotContain

[Gradle, JS] Add test on no output for dry run in gradle tests

[Gradle, JS] No output for dry run in gradle tests

Merge-request: KT-MR-6029
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51895 fixed
2022-04-11 10:38:27 +00:00
Artem Kobzar c724ca943d test: add labels and breaks count tests. 2022-04-11 10:37:21 +00:00
Artem Kobzar 12f337f63d chore: fix meterialize argument annotation. 2022-04-11 10:37:19 +00:00
Artem Kobzar d46db2a9f3 fix: block statements rendering. 2022-04-11 10:37:18 +00:00
Artem Kobzar e405799b3b chore: use fqName instead of custom crafted name. 2022-04-11 10:37:16 +00:00
Artem Kobzar 7ef14fc11b chore: use CompositeBlock instead of GlobalBlock. 2022-04-11 10:37:14 +00:00
Artem Kobzar c6136619d2 chore: remove unreadable blocks and use comments instead. 2022-04-11 10:37:13 +00:00
Artem Kobzar fba4ac12b7 chore: remove unused break statement for inline functions. 2022-04-11 10:37:11 +00:00
Dmitriy Dolovov 24552a625c [Native][tests] Reorganize OUTPUT_DATA_FILE directive
Use it as one of [TestRunCheck]s.
2022-04-09 19:06:26 +00:00
Dmitriy Dolovov 996ff5085d [Native][tests] Introduce EXIT_CODE directive
It allows to specify the expected exit code for STANDALONE_NO_TR tests.
2022-04-09 19:06:25 +00:00
Dmitriy Dolovov 261e177b39 [Native][tests] Introduce EXPECTED_TIMEOUT_FAILURE directive
It allows to correctly handle tests that were failed by timeout where such failure is the expected behavior.
2022-04-09 19:06:24 +00:00
Dmitriy Dolovov 7cf3ca29af [Native][tests] Fix: Avoid including similar but mutually exclusive shared modules into the same compilation 2022-04-09 19:06:24 +00:00
Dmitriy Novozhilov 862b8cd9e5 Advance bootstrap to 1.7.20-dev-52 2022-04-09 09:58:34 +00:00
Ilmir Usmanov 1e3f84402d Safely check for suspend function parent
The issue here is that the function can be in unlowered file, and
thus its parent package fragment and not class.

 #KT-49317 Fixed
2022-04-08 23:31:49 +02:00
Pavel Punegov 3138b29fb2 [build] Requre common capability for gradle plugin test dependency 2022-04-08 18:06:41 +03:00
Dmitriy Dolovov b5efbac704 [Native][tests] Add stub generator tests to "run"
More details: Add ":kotlin-native:Interop:StubGenerator:check" as a dependency to ":kotlin-native:backend.native:tests:run" task. This task is already present in ":kotlin-native:backend.native:tests:sanity" and was missing in "run" just by accident.
2022-04-08 15:13:40 +03:00
Alexander Udalov 349c17786e Fix missing error on fun interface constructor reference
#KT-51843 Fixed
2022-04-08 14:02:14 +02:00
Alexander Udalov 6402c3908c Validate -Xbackend-threads CLI argument value
#KT-51846 Fixed
2022-04-08 14:01:21 +02:00
Pavel Punegov d69df1898d [build] Advance kotlin-build-gradle-plugin version to 0.0.38 in the repo
Use build Gradle plugin version property
2022-04-08 14:42:35 +03:00
Pavel Punegov 3a4d6bcb18 [build] Advance kotlin-build-gradle-plugin version to 0.0.38 2022-04-08 14:42:08 +03:00