Commit Graph

55 Commits

Author SHA1 Message Date
Ilya Gorbunov 6bcd112062 Drop obsolete artifact kotlin-runtime
Remove suppresses used to compile some parts of stdlib
as a non-multiplatform project.
2019-02-18 19:20:30 +03:00
Ilya Gorbunov 811566bbe0 Drop obsolete artifacts kotlin-stdlib-jre7/8 2019-02-18 18:44:35 +03:00
Dmitry Petrov 189b05f8a4 Update testData for public API: companion field visibility in 1.3 2018-10-02 16:20:09 +03:00
Alexander Udalov 55c8b35eee Remove unneeded default imports in stdlib and tests 2018-10-01 13:39:02 +02:00
Ilya Gorbunov 4c6c0aa279 Update public API test due to ProperVisibilityForCompanionObjectInstanceField 2018-08-30 14:50:19 +03:00
Ilya Gorbunov f8217ef28f Extract subclasses of JvmMemberSignature sealed class to top-level
Use more specific subtypes of sealed class in visitors.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov 1a290d0c73 Refactor: make JvmMemberSignature a sealed class
Use JvmMemberSignature.asString instead of toString
2018-06-01 06:43:48 +03:00
Ilya Gorbunov 36c658fd8b Introduce JvmMemberSignature to represent name and desc of jvm methods and fields
Return member name and desc in a class in order not to parse that information
from concatenated string when required.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov ad8c64e127 bcv: refactor: do not convert flags to string representation 2018-05-23 05:00:57 +03:00
Ilya Gorbunov 66a9a90455 bcv: cleanup the old way of reading kotlin visibilities 2018-05-23 05:00:57 +03:00
Ilya Gorbunov fcf323851e bcv: use kotlinx-metadata-jvm to read kotlin visibilities
It's no longer required to dump kotlin-to-java declaration mapping to json
before using binary-compatibility-validator.

@JvmOverloads are not supported yet, so remove them from test.

Use asm:6.0 in bcv
2018-05-23 05:00:56 +03:00
Ilya Gorbunov 1872550f25 binary-compatibility-validator: add test case for parameters with default values
Move JvmOverloads test there.
2018-05-23 05:00:56 +03:00
Alexander Udalov c57864e46c Require "-Xuse-experimental=kotlin.Experimental" on usages of Experimental
Since we're not yet sure of the design of Experimental/UseExperimental,
we're making them "experimental" themselves in some sense, in that the
user is required to provide the magic argument
"-Xuse-experimental=kotlin.Experimental" to be allowed to use either
Experimental or UseExperimental. This is more convenient than the
previous approach of "-language-version 1.3
-Xskip-metadata-version-check" because it's simpler and does not cause
pre-release binaries to be produced
2018-05-04 13:48:24 +02:00
Ilya Gorbunov 93f7a46ba4 stdlib-jvm: build as multiplatform, move project to jvm subfolder
Fix path with stdlib-jvm artifacts for public api test
2018-04-12 17:53:00 +03:00
Ilya Gorbunov ae62cd6570 Do not produce original kotlin-stdlib public api dump anymore
It was produced from the kotlin-stdlib of 1.0 which was separate from the kotlin-runtime.
The actual dump is in kotlin-stdlib-runtime-merged.txt
2018-04-12 17:53:00 +03:00
Alexander Udalov 2d41c7d462 Add module-info.java for standard Kotlin libraries
Using the new multi-release jar feature, store compiled
module-info.class files into META-INF/versions/9 instead of the artifact
root. Hopefully, this will break fewer tools which do not support
module-info.class files because any sane tool should not do anything
with files in META-INF because before Java 9 that directory only
contained resources.

Upgrade some Maven plugins to newer versions which do not fail on
module-info.class files

 #KT-21266 In Progress
2018-04-03 21:22:14 +02:00
Ilya Gorbunov 5c0cc5f799 Move deprecated kotlin-runtime and reduced runtime for tests into stdlib
Rename mock-runtime-for-test project to kotlin-stdlib:jvm-minimal-for-test
2018-02-26 17:11:11 +03:00
Alexander Udalov 31e762c679 Move 1.3-specific part of stdlib to another source set 2018-02-15 13:14:37 +01:00
Alexander Udalov 329fbd8fa8 Extract kotlin-reflect-api module out of kotlin-reflect
This is needed only for faster compilation of the Kotlin project itself
and has no effect on the public artifact
org.jetbrains.kotlin:kotlin-reflect.

The problem this is solving is the rebuild of the project once anything
has been changed in modules in 'core' (even inside function bodies, i.e.
a non-API change). Previously, changes in 'core' led to the compilation
of kotlin-reflect, which led to the rebuild of all modules depending on
kotlin-reflect directly or indirectly (which is almost all modules in
the project) because kotlin-reflect's artifacts are custom-built and the
changes can not be picked up incrementally. But 99.9% of the time the
initial changes in 'core' could not have any effect on the usages of
kotlin-reflect, because classes from those modules are moved to an
internal package in kotlin-reflect and thus are an internal
implementation detail.

Now, changes in 'core' still lead to the compilation of kotlin-reflect
and to the process of building the custom jar. But if a module depends
on kotlin-reflect-api, not kotlin-reflect, then the incremental
difference checker will detect that the module does not have to be
recompiled if there hasn't been any changes to the API of
kotlin-reflect-api. Which means that the module will not be rebuilt on
every change in 'core'.

This commit only introduces the new module. The dependencies
(kotlin-reflect -> kotlin-reflect-api) are replaced in the next commit.
2017-11-28 12:35:48 +01:00
Alexander Udalov 3e8b39af90 Move kotlin-reflect Gradle project to libraries/reflect/ 2017-11-28 12:33:21 +01:00
Alexander Udalov e253acd5fd Introduce kotlin-stdlib-jdk7/8 libraries, deprecate kotlin-stdlib-jre7/8
The idea is to keep all declarations in the same packages from Kotlin's
point of view, but use JvmPackageName annotation to move them to another
JVM package, to avoid the split package problem which is otherwise
unsolvable when using module path on Java 9 (KT-19258).

In this commit, kotlin-stdlib-jre7/8 are moved to kotlin-stdlib-jdk7/8
and in the subsequent commit, -jre7/8 are restored. This is done in
order to make Git recognize this as a file move to preserve history.

Include new stdlib-jdkN artifacts in manifest version tests.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov de004337a2 Pass arguments to bcv tests with system properties rather than env 2017-10-11 19:20:24 +03:00
Ilya Chernikov 95035b3d72 Fix various tests 2017-09-20 11:51:23 +02:00
Ilya Gorbunov 180233b78e binary-compatibility-validator: use project version to disambiguate artifacts 2017-05-05 18:01:02 +03:00
Ilya Gorbunov 723642c9d4 binary-compatibility-validator: depend on required artifacts to ensure they are built.
Read dumped declarations lazily in order not to fail on class initialization.
2017-04-17 15:17:02 +03:00
Ilya Gorbunov 94895c4e4d Clean warnings in binary-compatibility-validator cases 2017-04-17 14:50:07 +03:00
Ilya Gorbunov 02293dab9e Add public api dumps for kotlin-reflect and kotlin-stdlib-jre7/8 2017-04-06 20:32:37 +03:00
Ilya Gorbunov e090a44b71 Migrate binary-compatibility-validator tests to gradle. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov d4d647ab00 Remove public synthetic annotation holder methods from public API dump. 2017-02-07 14:41:56 +03:00
Ilya Gorbunov 970490e097 Revert "Update rendered public API". This reverts commit a10c6f00f9.
Revert "Update stdlib reference and binary compatibility test data". This reverts commit 2d02e5106f.
2017-02-07 14:41:31 +03:00
Alexander Udalov 2d02e5106f Update stdlib reference and binary compatibility test data
After 0db60bf and 5cffb38
2017-02-06 19:39:15 +03:00
Ilya Gorbunov 070f9d9d17 Binary compatibility validation: dump public API of merged stdlib to another file 2017-01-24 22:04:46 +03:00
Mikhael Bogdanov 1f26c3098f Binary compatibility validator tests update according to new @PublishedApi annotation 2016-12-12 10:25:05 +01:00
Mikhael Bogdanov 58263c46cc Compatibility validator update 2016-12-09 11:55:15 +01:00
Mikhael Bogdanov 95a47e56f7 InlineExposed usages are changed to PublishedApi 2016-12-09 11:55:14 +01:00
Ilya Gorbunov 78a89ef30a Add a hint how to regenerate API dump 2016-11-27 13:50:14 +03:00
Ilya Gorbunov b7b320e4ce @JvmOverloads-generated overloads of final methods are also final: update public API tests. 2016-11-18 19:53:24 +03:00
Ilya Gorbunov b6460e6280 binary-compatibility-validator, minor: refactor annotation utilities. 2016-10-14 18:53:54 +03:00
Ilya Gorbunov 0b3fb41eeb Do not include $DefaultImpls inner classes in public API when they do not contain any public members (i.e. used only as a container to hold synthetic methods with annotations for properties or typealiases) 2016-10-13 09:52:42 +03:00
Ilya Gorbunov 6ba98f7fe6 Binary compatibility validator: filter out empty facades *after* members are flattened from non-public part superclasses.
Use stable member sort order for members flattened from non-public superclasses, rewrite test to make order matter.
2016-03-30 20:44:44 +03:00
Ilya Gorbunov 4c113ad882 Prettify dump output format: indent members and enclose them in { }, space before : in supertypes. 2016-03-29 13:50:02 +03:00
Ilya Gorbunov ff0a24a750 Move test output files closer to test data.
Move reference dump out of test directory.
2016-03-29 13:50:01 +03:00
Ilya Gorbunov 2e87a08c8d Ignore kotlin visibilities for classes in effectively public package kotlin.jvm.internal 2016-03-29 13:49:59 +03:00
Ilya Gorbunov ce4b161df4 Find single jar file with binaries in target folders without knowning its version in advance. 2016-03-29 13:49:57 +03:00
Ilya Gorbunov a75093650c Add JvmField and const tests for exposed fields visibility 2016-03-29 13:49:55 +03:00
Ilya Gorbunov 0d12d60e8a Infer lateinit-exposed field effective visibility from its setter visibility. 2016-03-29 13:49:53 +03:00
Ilya Gorbunov f2cb5edf1a Do not consider protected members in final class as public API 2016-03-29 13:49:51 +03:00
Ilya Gorbunov 4e250e4dd1 Refactor data structures 2016-03-29 13:49:49 +03:00
Ilya Gorbunov 10792de4c1 Treat inline-exposed internal API as effectively public.
Comment out unsupported cases.
2016-03-29 13:49:48 +03:00
Ilya Gorbunov 0aaf0ba60f Take into account field kotlin visibility 2016-03-29 13:49:46 +03:00