Commit Graph

11192 Commits

Author SHA1 Message Date
Mads Ager ff84c19eff Make kotlin-android-extensions always cause a compilation error.
kotlin-android-extensions are deprecated and have been scheduled
for removal in 1.8.0.

https://android-developers.googleblog.com/2022/02/discontinuing-kotlin-synthetics-for-views.html
2022-09-16 15:03:01 +02:00
Ilya Goncharov bf8681296b [Gradle, JS] IR by default and report warnings for using legacy compiler
- just legacy - report warning about deprecation
- both - report warning about deprecation of legacy
- no compiler explicitly chosen - error about explicit setting compiler

warn from cli legacy compiler

nowarn flag - kotlin.js.compiler.nowarn

KT-42326
KT-53074
2022-09-16 09:48:41 +00:00
Yahor Berdnikau 928e0e7fb8 Set default stdlib dependency to kotlin-stdlib-jdk8
^KT-53830 Fixed
2022-09-16 07:42:15 +00:00
Alexander Korepanov 47bbd5e8c1 [JS IR] Add work around in EnumEntriesList for JS IR to avoid name clashes
JS IR generates bridges with type checks for special class methods,
 however if parent and child type parameters are same,
 the JS signature for the generated brige will be clashed with
 the JS signature of original method.

 This patch changes type parameter name of EnumEntriesList to avoid the clash.

^KT-54011 Fixed
2022-09-16 07:19:20 +00:00
Alexander Korepanov dd7d669464 [JS IR] Use jsOutputName for module naming when IC is enabled
^KT-53986 Fixed
2022-09-16 07:19:20 +00:00
Alexander Korepanov e38f1494fc [JS IR] Enable JS IR IC by default
^KT-53112 Fixed
2022-09-16 07:19:19 +00:00
Anže Sodja 17cd0d7dbc [Assign plugin] Add Gradle plugin and IDE dependencies for Assignment compiler plugin 2022-09-16 10:12:41 +03:00
Alexander Udalov 0569f429dd Report error on -Xuse-old-backend, remove Gradle option useOldBackend
Allow using old JVM backend only to compile kts.

 #KT-48532 Fixed
2022-09-16 00:16:31 +02:00
Ilya Chernikov 0814c0da57 Fix lowering of receiver access in IR scripting
#KT-53947 fixed
without the fix, in the presence of the implicit receiver of the same
type as the processed receive, the lowering was incorrectly substituting
the correct receiver with the accessor to the implicit one
2022-09-15 22:05:00 +02:00
Igor Yakovlev e2d758213f [WASM] Bump wasm gradle tests and ignore binaryen tests 2022-09-15 16:27:46 +00:00
Igor Yakovlev c94a051c19 [WASM] Renew to Milestone 6 instructions set 2022-09-15 16:27:42 +00:00
Igor Yakovlev 95396eb61a [WASM] When expressions optimisations for String and Int constant cases 2022-09-15 16:27:39 +00:00
Igor Yakovlev fff6b16483 [WASM] Wasm string.plus optimisations 2022-09-15 16:27:39 +00:00
Ilya Gorbunov fe187b609f Temporary ignore dependencies test
KT-51907
2022-09-15 17:39:30 +02:00
Ilya Gorbunov 18e4d9e16c Deprecate modules of the empty artifacts to discourage their usage
#KT-51907
2022-09-15 15:38:33 +00:00
Ilya Gorbunov 1b6a462057 Move contents of stdlib-jdk7/8 into stdlib
#KT-51907
2022-09-15 15:38:32 +00:00
Alexander Korepanov 09add47777 [JS IR] Trigger klib rebuild after removing a dependency
^KT-50503 Fixed
2022-09-15 10:56:41 +00:00
Ilya Gorbunov b53a6beb61 Loosen the signature of declaringJavaClass to accept Enum<E> instead of E
KT-54005
2022-09-14 13:39:25 +00:00
pyos 41299287cf Remove incorrect override in TypeVariableImpl
The correct return type of getAnnotatedBounds is Array<AnnotatedType>.
This fact causes some problems now that kotlin-stdlib is targeting JDK
1.8:

  * the compiler generates a bridge to the incorrect "override" that
    attempts to cast an empty Array<Annotation> into the correct type,
    which fails because those two types are unrelated;

  * on Android, touching this method in any way (via reflection) on
    any API version causes a ClassNotFoundException;

  * tools that validate references in libraries when compiling for
    Android complain about the bridge because they know the returned
    type does not exist.

The easiest solution is to simply remove the override and leave
getAnnotatedBounds unimplemented, making it throw AbstractMethodError
when called. This is the behavior it previously had anyway, as
kotlin-stdlib targeting JDK 1.6 lacked a method with the correct
signature.
2022-09-14 15:00:57 +02:00
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