Commit Graph

11860 Commits

Author SHA1 Message Date
Svyatoslav Kuzmich 3bbd8c291a [Wasm] Add @WasmImport annotation
Imports top-level function from given module
2022-12-28 12:13:18 +01:00
Andrey Uskov e5ad45d46b Report Kover usage in FUS
#KT-54247 Fixed
2022-12-27 16:28:22 +00:00
Pavel Punegov d735fa6567 [K/N][gradle] Remove download url property. 2022-12-27 16:10:36 +00:00
Pavel Punegov 3b6de8b899 [K/N][gradle][test] Fix repositories in the test and add another one 2022-12-27 16:10:35 +00:00
Pavel Punegov 6744702eff [K/N][gradle][test] Merge tests for downloading and platform libs 2022-12-27 16:10:35 +00:00
Pavel Punegov afeeba51ec [K/N][gradle] Add kotlin.native.distribution.mavenDownloadUrl property
Add a separate property to specify maven repository to download K/N
2022-12-27 16:10:35 +00:00
Pavel Punegov 82d28b6dbf [K/N][gradle][test] Tests KGP ability to download artifacts from maven 2022-12-27 16:10:34 +00:00
Pavel Punegov 5c6af6559a [K/N][gradle] Download bundles from Maven repository
Adds property to make Gradle download Native builds from maven.
The URL can be specified with another property or with standard Gradle
`repository { maven(...) } ` repository management blocks.
2022-12-27 16:10:34 +00:00
Abduqodiri Qurbonzoda fff593492d Introduce Common AutoCloseable & use #KT-31066
Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>

Merge-request: KT-MR-8113
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2022-12-27 11:50:22 +00:00
Andrey Uskov e3282d090d Report in FUS tracking of prepareKotlinBuildScriptModel invocations
Currently, if user creates new project using wizard, there are several
invocations of Gradle. It is difficult to identify import process
itself. Now it could be done by monitoring invocations of
prepareKotlinBuildScriptModel task.
#KT-54998 Fixed
2022-12-26 17:18:51 +03:00
Andrey Uskov 70db910767 Report new IC usage in FUS
#KT-55000 Fixed
2022-12-26 17:18:50 +03:00
Andrey Uskov 4c80538a78 Added validation rules of FUS metrics on Gradle side
#KT-55541 Fixed
2022-12-26 17:18:48 +03:00
Andrey Uskov 0f33722124 Improved collecting compilation metrics in FUS
#KT-55537 Fixed
2022-12-26 17:18:46 +03:00
Andrey Uskov 5e06c52073 Support weight for FUS metrics
If metric impact is different for different subprojects, corresponding
metric could be reported with weight. Currently supported for numerical
metrics with override policy AVERAGE.
2022-12-26 17:16:03 +03:00
nataliya.valtman 161d8d1cea KT-54959 Add worker execution time to task action execution time 2022-12-26 12:03:37 +03:00
nataliya.valtman d6bbab7eff Fix unstable build statistics with ktor tests 2022-12-26 12:03:37 +03:00
Ilya Gorbunov e2d96da396 Introduce experimental kotlin.concurrent.Volatile annotation KT-55268, KT-55609
Use this annotation in tests to ensure it works the same at least on JVM
2022-12-23 19:07:30 +01:00
Ilya Gorbunov b6e6ca7c96 Deprecate Synchronized annotation in common and JS #KT-55344 2022-12-22 21:22:44 +00:00
Ilya Goncharov e19776bd5a [Gradle, JS] Make webpack task cacheable
[Gradle, JS] Remove redundant dependsOn

[Gradle, JS] Private metrics

[Gradle, JS] Fix test with run webpack on windows

[Gradle, JS] Fix detecting of input files instead of const folder kotlin

[Gradle, JS] Change up-to-date annotations in webpack task

[Gradle, JS] Add test on webpack considering changes in dependencies in up-to-date checks

[Gradle, JS] Add test on buid cache of Webpack task

[Gradle, JS] webpack config appliers are nested inputs

[Gradle, JS] Webpack task is cacheable with relative pathes

^KT-55476 fixed
2022-12-22 17:19:38 +00:00
Ilya Goncharov 72701ada29 [Gradle, JS] Move tests related with adding of dom api to separate class 2022-12-22 15:45:25 +00:00
Ilya Goncharov 0cfff4fc87 [Gradle, JS] Disable test about implementation/api dependencies in IR 2022-12-22 15:45:25 +00:00
Ilya Goncharov 68d5619af4 [Gradle, JS] Add test on adding dom-api-compat library 2022-12-22 15:45:24 +00:00
Ilya Goncharov 3f7e33df60 [JS] Remove maven examples 2022-12-22 15:45:24 +00:00
Ilya Goncharov 7a04c38863 [Gradle, JS] Fix Gradle integration tests related with extracting dom api to separate module
- remove tests which were related with deprecated plugins
- migrate some tests to new plugin instead of deprecated
2022-12-22 15:45:23 +00:00
Ilya Goncharov 24cb10bbf3 [Gradle, JS] Add module kotlin-dom-compat-api as dependency with opt-out 2022-12-22 15:45:23 +00:00
Ilya Goncharov 688894aabc [JS, Stdlib] Move DOM API to separate module kotlin-dom-api-compat
[JS, Stdlib] Leave sources of dom api inside stdlib

[Stdlib, JS] Leave ItemArrayLike inside stdlib
2022-12-22 15:45:23 +00:00
Dmitriy Novozhilov 7cbe13dee9 [JS] Update testdata of ApiTest.test(Ir)Stdlib
Most likely it caused by 17e9a6a781
2022-12-21 22:30:08 +00:00
Aleksei.Cherepanov d26b96afe1 Avoid failure of maven compilation if empty args are passed
#KT-54822 Fixed

Merge-request: KT-MR-8103
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2022-12-21 14:35:07 +00:00
Ilya Chernikov 8c5739739c minor: drop main-kts tests on oldBE
it is not supported anymore
2022-12-21 14:34:22 +00:00
Ilya Chernikov deb2d6d024 K2 Scripting: enable K2 tests in some test projects 2022-12-21 14:34:21 +00:00
Ilya Chernikov 90a4f6002e K2 Scripting: support sam-with-receiver in scripting plugin 2022-12-21 14:34:21 +00:00
Ilya Goncharov 256764f012 [Gradle, JS] Add test with packaged moduleName
[Gradle, JS] WA for moduleName starting with @

^KT-53288 fixed
2022-12-21 11:34:05 +00:00
Bogdan Mukvich e97ecc13b0 Cleanup pre-push hook
KTI-673
2022-12-20 08:53:41 +00:00
Yahor Berdnikau 2e5981eb94 Fix eager Kotlin/JVM task configuration on Gradle 7.3+
^KT-54836 Fixed
2022-12-19 21:00:12 +00:00
Abduqodiri Qurbonzoda fb31a29c39 [K/N] Fix stack overflow in regex when a quantifier is matched many times
Motivation:

Users often expect simple patterns, like `[a]+` or `[^a]+`, to work fast
and without any problems, even with long strings.
Char class from the first pattern matches only 'a' and gets wrapped into
LeafQuantifierSet, and works fine with long strings indeed.
Char class from the second pattern, however, matches any character
except 'a', including supplementary code points. So, the number of chars
it consumes is not known beforehand. There is no optimization for such
char classes, and if they are matched multiple times, the stack memory
gets exhausted.

Modification:

Introduce FixedLengthQuantifierSet node.
The node represents quantifier over constructs that consume a fixed
amount of characters for a given string and index. Such constructs don't
need backtracking to find a different match. Thus, it is possible for
the node to avoid recursion when matching multiple times.

Result:

Fixes KT-46211, KT-35508 and probably KT-39789. Reproducer for the
latter issue is no longer available, but error stacktrace resembles
those of the other issues.
2022-12-19 16:40:51 +00:00
Abduqodiri Qurbonzoda 6e50bbee3b [K/N] Set mayContainSupplCodepoints flag only when alt is updated
Motivation:

Calling AbstractCharClass.setNegative always leads to
mayContainSupplCodepoints being `true`, even when `alt` is already
equal to the argument. Given that CharClass always calls setNegative
with its constructor parameter - `negative`, mayContainSupplCodepoints
always gets set. i.e. `[a]` will have mayContainSupplCodepoints set.
mayContainSupplCodepoints affects what node (RangeSet or SupplementaryRangeSet)
wraps this char class. See Pattern.processRangeSet.
RangeSet is better optimized and avoids recursion when it is quantified.

Modification:

Set `mayContainSupplCodepoints` flag only when `alt` is updated.
When `alt` is updated, this char class gets inverted, hence now may
contain supplementary code points.
Otherwise, content of this char class does not change, i.e. no new
supplementary code points is added.

Result:

Fixes KT-46211.
2022-12-19 16:40:51 +00:00
Abduqodiri Qurbonzoda d7f166eda3 [K/N] Remove unused SupplementaryCharSet in regex
Motivation:

The node was never used. Perhaps, it was copied from apache harmony
but ultimately, despite possible performance impact, SequenceSet was
used instead. See Pattern.processCharSet and AbstractSet.first.
The performance impact wouldn't be noticeable anyway.

Modification:

Keeping unused code in project is not a good practice, so get rid of it.

Result:

Less code to maintain.
2022-12-19 16:40:50 +00:00
Yahor Berdnikau 11bc3dbd82 Undeprecate missed kotlinOptions deprecation
^KT-54580 Fixed
2022-12-16 17:25:50 +00:00
Yahor Berdnikau 860d3fda95 Undeprecate 'kotlinOptions' DSL
'@ReplaceWith' is not that flexible in this case and proper IDE support
required for smooth migration. After such migration in IDE will be added
 - deprecation should be restored.

 ^KT-54399 Fixed
2022-12-16 17:25:49 +00:00
Sebastian Sellmair b6682d1789 [Gradle] IdeaKotlinClasspath: Use Intener implementation from kotlin-tooling-core
^KT-55475 Verification Pending
2022-12-16 16:46:16 +00:00
Sebastian Sellmair 71fac797ee [kotlin-tooling-core] Implement generic Interner
^KT-55475 Verification Pending
2022-12-16 16:46:16 +00:00
Sebastian Sellmair ca32347c91 [Gradle] Add IdeaKotlinClasspathSerializationTest.test - empty ByteArray
^KT-55475 Verification Pending
2022-12-16 16:46:15 +00:00
Sebastian Sellmair e19d5768e2 [Gradle] Add documentation on IdeaKotlinProjectArtifactDependency.artifactsClasspath
^KT-55475 Verification Pending
2022-12-16 16:46:15 +00:00
Sebastian Sellmair aed8c323e4 [Gradle] Fix IdeSourceDependencyResolutionTest after 9f810116
^KT-55475 Verification Pending
2022-12-16 16:46:14 +00:00
Sebastian Sellmair 38f310467a [Gradle] Implement IdeaKotlinClasspath interner
This very simple interner mechanism ensures that when import runs
within the IDE process, we de-duplicate existing file instances.

This might have an effect, because during GradleProjectResolution
we could have plenty source sets that refer to the same
files.

^KT-55492 Verification Pending
2022-12-16 16:46:14 +00:00
Sebastian Sellmair e32cff3b38 [Gradle] Implement IdeMultiplatformImport using new IdeaKotlinClasspath
^KT-55492 Verification Pending
2022-12-16 16:46:13 +00:00
Sebastian Sellmair 53c5444a7a [Gradle] kgp-idea: Compatibility tests: bump version to 1.8.20-dev-4242
KT-55492
2022-12-16 16:46:13 +00:00
Sebastian Sellmair 4eb5641e2a [Gradle] Implement IdeaKotlinClasspath concept
KT-55492
2022-12-16 16:46:13 +00:00
Yahor Berdnikau 189ef3425f Add test to check kaptGenerateStub and KotlinCompiler have same module-name
^KT-55334
2022-12-16 09:27:40 +00:00
Takumi Maeomote c4f83adc2a Add sample for Map.asSequence (#5055) 2022-12-15 19:58:38 +03:00