Commit Graph

11173 Commits

Author SHA1 Message Date
Alexander Udalov b158ece232 Tweak module exclusion filter for -Xjvm-default=all
- Remove obsolete exclusion of core & stdlib modules, since they are now
  compiled with JVM target 1.8, but leave `:core:descriptors` because of
  an issue in Proguard.
- Remove binary-compatibility-validator and update test data instead.
- Replace some "contains" checks with equality for clarity.
- Remove modules from -Werror filter which no longer use the deprecated
  compatibility mode.
2022-09-14 14:40:39 +02:00
Mikhael Bogdanov c168a19a58 Build compiler with -Xjvm-default=all + @JvmDefaultCompatibility when needed 2022-09-14 14:40:37 +02:00
Abduqodiri Qurbonzoda 4e1cb12024 Remove deprecated Experimental and UseExperimental annotation classes #KT-53864 2022-09-13 17:19:01 +03:00
Alexander Likhachev 2b26d1cc02 [Gradle, JS] Disable KotlinJsDce caching when it's in dev mode
#KT-53788 Fixed
2022-09-12 14:55:19 +00:00
Ilya Muradyan 551a481dc5 [Scripting] Add partial transitive resolution to Maven resolver 2022-09-12 14:11:04 +02:00
Anton Lakotka 8acc6c9093 [Gradle][MPP] Mark sourceSet field as transient in CInteropMetadataDependencyTransformationTask
^KT-52726 Verification Pending
2022-09-12 10:58:47 +00:00
Sebastian Sellmair a914750108 [Gradle][MPP] Fix MetadataMappedCompilationDetails.compilation using wrong name for compilation
^KT-52726 Verification Pending
2022-09-12 10:58:47 +00:00
Sebastian Sellmair 60723bd59f [Gradle][MPP][Minor] KotlinTargetConfigurator: Use Callable instead of lambda
^KT-52726 Verification Pending
2022-09-12 10:58:47 +00:00
Sebastian Sellmair 7fae9a1b73 [Gradle][MPP] Remove AbstractKotlinTargetConfigurator.createDefaultSourceSets
^KT-52726 Verification Pending
2022-09-12 10:58:47 +00:00
Sebastian Sellmair 67fc4f0ed6 [Gradle][MPP] Replace .kotlinSourceSetsIncludingDefault with .kotlinSourceSets
^KT-52726 Verification Pending
^KT-45412 Verification Pending
2022-09-12 10:58:46 +00:00
Sebastian Sellmair f4eba62f8c [Gradle][MPP] Ensure presence of .defaultSourceSet when creating kotlinCompilations
This will finally make calls to KotlinCompilation.defaultSourceSet
or sourceSets.getByName(compilation.defaultSourceSetName) safe.

This will also enable removing the `kotlinSourceSetsIncludingDefault`
pitfall

^KT-52726 Verification Pending
2022-09-12 10:58:46 +00:00
Sebastian Sellmair 5f085f0448 [Gradle][MPP] Move KotlinCompilationsModuleGroupsTest into functionalTest
^KT-52726 Verification Pending
2022-09-12 10:58:46 +00:00
Sebastian Sellmair 8bff1dee37 [Gradle][MPP] Move SourceSetVisibilityInferenceTest into functionalTest
^KT-52726 Verification Pending
2022-09-12 10:58:46 +00:00
Sebastian Sellmair ea483c01fe [Gradle][MPP] Replace InternalKotlinSourceSet.addCompilation by exposing mutable .compilations
This requires to make MutableObservableSet public as well, since
public implementations will inherit. The MutableObservableSet
therefore move its implementation to an internal
MutableObservableSetImpl

^KT-52726 Verification Pending
2022-09-12 10:58:46 +00:00
Sebastian Sellmair 84a22256f9 [Gradle][MPP] AbstractCompilationDetails.source: Return early if source was already added
^KT-52726 Verification Pending
2022-09-12 10:58:45 +00:00
Sebastian Sellmair 0b9c5b1cf0 [Gradle][MPP] CompilationDetails: Rename kotlinSourceSetsClosure to allKotlinSourceSets
^KT-52726 Verification Pending
2022-09-12 10:58:45 +00:00
Sebastian Sellmair 0f5a298689 [Gradle][MPP] InternalKotlinSourceSet: Provide class information on casting failure
^KT-52726 Verification Pending
2022-09-12 10:58:45 +00:00
Sebastian Sellmair 63232b1849 [Gradle][MPP] Implement assertAllImplementationsAlsoImplement assertion function
^KT-52726 Verification Pending
2022-09-12 10:58:45 +00:00
Sebastian Sellmair 134ed4bae1 [Gradle][MPP] ObservableSet.addAll: Incrementally add elements and invoke listeners
^KT-52726 Verification Pending
2022-09-12 10:58:44 +00:00
Sebastian Sellmair 74b2285877 [Gradle][MPP] Implement additional InternalKotlinSourceSetTests
.. for withDependsOnClosure and compilations

^KT-52726 Verification Pending
2022-09-12 10:58:44 +00:00
Sebastian Sellmair a0d350fad4 [Gradle][MPP] ObservableSet: Implement equals/hashCode/toString
^KT-52726 Verification Pending
2022-09-12 10:58:44 +00:00
Sebastian Sellmair dc8a6b8def [Gradle][MPP] Replace slow CompilationSourceSetUtil with InternalKotlinSourceSet api
^KT-52726 Verification Pending
2022-09-12 10:58:44 +00:00
Sebastian Sellmair 0e6a074c9c [Gradle][MPP] Implement InternalKotlinSourceSet.compilations
This property can later be used to replace the slow
compilationsBySourceSet util.

KT-52726
2022-09-12 10:58:43 +00:00
Sebastian Sellmair 5a4f73be50 [Gradle][MPP] Implement InternalKotlinCompilation and make .kotlinSourceSets and .allKotlinSourceSets observable
The effect of this changes are twofold:

1) Maintaining the 'allKotlinSourceSets' closure
makes access to this field cheaper

2) The observability of changes in the kotlinSourceSets
will allow implementing a faster compilationsBySourceSet util

KT-52726
2022-09-12 10:58:43 +00:00
Sebastian Sellmair 1d41a1cde7 [Gradle][MPP][Minor] kotlinCompilations.kt: Extract abstract classes into separate files
This shall increase readability and maintainablity.

KT-52726
2022-09-12 10:58:43 +00:00
Sebastian Sellmair 1c52f7c13b [Gradle][MPP][Minor] kotlinCompilations.kt: Remove unused 'composeName'
KT-52726
2022-09-12 10:58:43 +00:00
Sebastian Sellmair 5f924518af [Gradle][MPP] CompilationDetails.source: Use .forAll over 'whenEvaluated'
KT-52726
2022-09-12 10:58:42 +00:00
Sebastian Sellmair c6e9216663 [Gradle][MPP] Replace KotlinSourceSet closure extensions w/ InternalKotlinSourceSet API
KT-52726
2022-09-12 10:58:42 +00:00
Sebastian Sellmair d19aea36e5 [Gradle][MPP] Implement InternalKotlinSourceSet with observable dependsOn
This is used twofold:
1) The dependsOnClosure and withDependsOnClosure can be accessed
w/o any additional overhead

2) This can later be used to maintain caches for a
replacement of the slow compilationsBySourceSet util

KT-52726
2022-09-12 10:58:42 +00:00
Abduqodiri Qurbonzoda b388c7503b Advance Int/Long/Double.units deprecation level to ERROR #KT-53864 2022-09-11 23:49:07 +03:00
Abduqodiri Qurbonzoda 89b5ce1ed7 Advance Duration.toLongUnits() deprecation level to ERROR #KT-53864 2022-09-11 23:49:07 +03:00
Abduqodiri Qurbonzoda b1300332ee Advance Duration.inUnits deprecation level to ERROR #KT-53864 2022-09-11 23:49:06 +03:00
Abduqodiri Qurbonzoda 0b4ceb0897 Advance Duration.units(value) deprecation level to ERROR #KT-53864 2022-09-11 23:49:06 +03:00
Abduqodiri Qurbonzoda 7060811c8b Remove the brittle contains optimization code #KT-47707 2022-09-11 10:54:37 +00:00
Alexander Udalov 686cd82327 Serialize OptIn to builtins, improve tests
Skip SOURCE-retention annotations in builtins serialization tests,
because otherwise the source analysis result can't be equal to the
metadata deserialization result.

 #KT-53073 Fixed
2022-09-09 21:31:39 +02:00
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Alexander Udalov 87d3ce6ded Write a copy of SMAP to a new annotation
To make it available for dynamically attached JVMTI agents.

`@SourceDebugExtension` annotation value is equal to the
SourceDebugExtension attribute value, which is checked now for all box
tests. The difference is that the annotation stored in the constant
pool, which is available for dynamically attached JVMTI agents.

 #KT-53438 Fixed
2022-09-09 14:32:35 +02:00
Sergej Jaskiewicz b9cac8a4ca [JS IR] Support the sourceMapEmbedSources setting (partially)
This doesn't work with external libraries yet (including stdlib).
2022-09-09 11:02:25 +00:00
Yahor Berdnikau 920fc2b8af Set minimal supported Gradle version to 6.8.3
^KT-53885 Fixed
2022-09-09 08:26:52 +00:00
Nikolay Krasko 496058c7e1 Forbid handling dashed in KotlinToolingVersion parsing 2022-09-08 14:45:59 +00:00
Nikolay Krasko ff04918125 Allow any classifiers for DEV maturity
Allow to have personal builds with custom versioning.

KTI-922
2022-09-08 14:45:58 +00:00
Nikolay Krasko a47377e214 Refactoring: utilities for checking build and classifier numbers 2022-09-08 14:45:58 +00:00
Nikolay Krasko 1df9882aed Refactoring: simplify maturity testing in KotlinToolingVersionTest 2022-09-08 14:45:58 +00:00
Abduqodiri Qurbonzoda 0db9326105 Introduce a deprecated StringBuilder.append(CharArray, Int, Int) in Common #KT-52336 2022-09-08 14:34:38 +00:00
Abduqodiri Qurbonzoda faedd76b32 Remove deprecation from ConcurrentModificationException constructors #KT-53927
The constructors were introduced in jdk7,
thus their usage was prohibited in Common code.
Now that jvmTarget is 1.8 and jdk8+ is used to compile stdlib,
these constructors are available on all platforms.
2022-09-08 14:01:09 +00:00
Abduqodiri Qurbonzoda 2d0e95cea0 Remove StringBuilder functions with nonnull parameter type in K/N and JS #KT-53864 2022-09-08 12:16:55 +00:00
Abduqodiri Qurbonzoda 0208246094 Remove StringBuilder functions with renamed parameters in K/N #KT-53864 2022-09-08 12:02:37 +00:00
Abduqodiri Qurbonzoda 73a65c1bb1 Promote top-level kotlin.math.cbrt() to stable #KT-53277 2022-09-08 12:00:58 +00:00
Abduqodiri Qurbonzoda 0763ab7bc1 Promote DurationUnit.toTimeUnit() and TimeUnit.toDurationUnit() to stable #KT-53277 2022-09-08 11:59:24 +00:00
Yahor Berdnikau 59a052a615 Add '@NormalizeLineEndings' annotation to task inputs
Excluding '@Classpath' inputs due to the bug in Gradle:
https://github.com/gradle/gradle/issues/20708.

Also MacOs only tasks are excluded.

^KT-50673 Fixed
2022-09-07 13:24:25 +00:00