Commit Graph

44618 Commits

Author SHA1 Message Date
Alexander Udalov 3f3e05a9d2 Move essential metadata-related classes to 'metadata' and 'metadata.jvm' 2018-03-14 12:25:16 +01:00
Alexander Udalov 88dea9aa70 Move NameResolver to module 'metadata' and J2K
Also move NameResolverImpl to 'metadata' and JvmNameResolver to
'metadata.jvm'
2018-03-14 12:25:16 +01:00
Alexander Udalov 0ba42850f9 Drop ClassData and PackageData, rename ClassDataWithSource -> ClassData
Use pairs in JvmProtoBufUtil for simplicity
2018-03-14 12:25:15 +01:00
Alexander Udalov 5ed5ac8291 Minor, use stdlib instead of ifEmpty 2018-03-14 12:25:14 +01:00
Alexander Udalov a5a69c5099 Remove dependency of ClassMapperLite on JavaToKotlinClassMap
There are two reasons for this. First, this class will be used in the
metadata reading library which should not have dependencies on lots of
compiler stuff JavaToKotlinClassMap depends on.

Second, it was easy to accidentally break the deserialization in old
compilers by adding another mapping to JavaToKotlinClassMap. This was
possible because ClassMapperLite is used to decide whether or not the
JVM signature is "trivial" and should be written to the metadata (at
JvmSerializerExtension.SignatureSerializer.requiresSignature). If the
signature is trivial but mentions a type added in JavaToKotlinClassMap
in the new compiler, the old compiler will not be able to load the
signature correctly. See the comment on ClassMapperLite for more
information
2018-03-14 12:25:14 +01:00
Alexander Udalov 070effc69d Minor, drop unnecessary ClassDescriptor.classId implementation 2018-03-14 12:25:13 +01:00
Alexander Udalov b07c6086cd Remove dependency of NameResolverImpl on FqName
Remove AbstractJsProtoComparisonTest.getProtoData in favor of
(apparently copy-pasted) IncrementalJsCache.getProtoData
2018-03-14 12:25:12 +01:00
Alexander Udalov 4f81e572c7 Make NameResolver.getName extension instead of member
To get rid of dependency of NameResolver on Name
2018-03-14 12:25:11 +01:00
Alexander Udalov e31f286444 Make NameResolver.getClassId extension instead of member
To get rid of dependency of NameResolver on ClassId
2018-03-14 12:25:11 +01:00
Alexander Udalov 27ad4f7d5d Move ProtoBuf classes to package org.jetbrains.kotlin.metadata 2018-03-14 12:25:10 +01:00
Alexander Udalov 575a388b11 Move core protobuf schemas to 'metadata' and 'metadata.jvm' 2018-03-14 12:25:09 +01:00
Alexander Udalov 368af867b8 Add modules metadata and metadata.jvm 2018-03-14 12:25:08 +01:00
Alexander Udalov 54d6710923 Regenerate gradle/project-schema.json 2018-03-14 12:25:07 +01:00
Alexander Udalov 99964cd030 Move descriptor-related utilities from Flags to ProtoEnumFlags 2018-03-14 12:25:07 +01:00
Alexander Udalov ec67a878a0 Minor, rename Deserialization -> ProtoEnumFlags
Also fix warnings and remove unneeded JvmStatic
2018-03-14 12:25:06 +01:00
Alexander Udalov 7e1b1db7cc Minor, don't use BitEncoding where it's not necessary 2018-03-14 12:25:05 +01:00
Alexey Tsvetkov ceb243c096 Don't pack kotlin-daemon-client and daemon-common into kotlin-compiler-runner jar 2018-03-14 13:29:32 +03:00
Alexey Tsvetkov c736f229ce Always depend on runtimeJar of kotlin-daemon-client 2018-03-14 13:29:32 +03:00
Sergey Igushkin 0039be6972 Fix binary incompatibility with Android Gradle plugin 3.2.0-alpha06
Remove a non-reflective usage of the ResourceSet class, which has been
moved to a different package between versions. Access it through
reflection instead. This is a workaround. We can introduce a proper
fix once we have a public API in the Android plugin.

The test case that could detect the compatibility issue is
`testAndroidExtensionsManyVariants` (it uses experimental Android
extensions), but we did not run it with 3.2.0-alpha6. This commit
adds a test class with the same tests for 3.2.0-alpha6.

Issue #KT-23192 Fixed
2018-03-14 04:11:35 +03:00
Alexey Tsvetkov 3a7a34cc4e Add all necessary compile dependencies to 'pill:generate-all-tests'
Before this change running the pill:generate-all-tests:testClasses
task (which is run by Intellij on "Build" invocation) led to compile error
2018-03-13 21:26:28 +03:00
Alexey Tsvetkov 0deec7983d Revert "Provide custom ConstantAffectionResolver in JPS"
This reverts commit 772a935de6.

The API in Intellij was changed, now the issue can be fixed only in
182.* branches.
2018-03-13 21:26:11 +03:00
Vyacheslav Gerasimov d831d35869 Add readme for including kotlin-compiler into composite build 2018-03-13 18:29:26 +03:00
Vyacheslav Gerasimov 0e879896e0 Add include/kotlin-compiler project
Needed to include kotlin compiler project into a composite build (kotlin native + cotlin compiler)
2018-03-13 18:29:24 +03:00
Vyacheslav Gerasimov 361e8e065c Remove unused xpp3 & xstream from IntellijCoreDependencies
They are 'fatjared' into kotlin-compiler but proguard removes them from resulting jar afterwards
2018-03-13 17:50:15 +03:00
Nikolay Krasko 7174b31756 Fix GradleConfiguratorTest.kt compilation 2018-03-13 17:42:40 +03:00
Nikolay Krasko 48f2fd8607 Add explicit set of supported file types to KotlinPositionManager 2018-03-13 15:52:21 +03:00
Nikolay Krasko 674fbc9871 Process dependencyManagement during stdlib-jre* deprecation check (KT-21745, KT-23161)
#KT-23161 Fixed
 #KT-21745 Fixed
2018-03-13 15:52:20 +03:00
Nikolay Krasko 57aaf0444f Add support for "implementation" gradle directive (KT-21746)
#KT-21746 Fixed
2018-03-13 15:52:19 +03:00
Nikolay Krasko 9004cdfa45 Reformat: idea-gradle module 2018-03-13 15:52:18 +03:00
Denis Zharkov cff88a3f8b Fix false positive unreachable code in case of Nothing!-typed calls
Note, that this change potentially has some other effects in corner cases
(like the changed test data that is rather sensible because `bar`
in the example is not effectively projected out and can be called
with nulls)

Probably, we need to consider rewriting all other isSomeType methods
in KotlinBuiltins, but now it seems to be a rather dangerous change

 #KT-16424 Fixed
2018-03-13 14:40:05 +03:00
Denis Zharkov a7854bc0ce Fix SAM detection algorithm for case of default overrides
#KT-22652 Fixed
2018-03-13 14:39:35 +03:00
Dmitry Jemerov b4fb0e0305 Further reduce number of calls to getConfigurableModulesWithKotlinFiles
Also handle INRE and requeue check
2018-03-13 12:29:16 +01:00
Dmitry Jemerov a29d693dc5 Fix inverted logic of isNotConfiguredNotificationRequired 2018-03-13 12:29:16 +01:00
Dmitry Jemerov fa39cec94b Avoid duplicate scan of modules with Kotlin files (KT-23183) 2018-03-13 12:29:16 +01:00
Alexey Sedunov 1be33b91fa MPP: Do not report ACTUAL_WITHOUT_EXPECT if compatibility is null for all modules
This fixes diagnostic tests
2018-03-13 14:18:36 +03:00
Sergey Igushkin c0a17f72a7 Fix bad property name introduced in the fix for #KT-23085 2018-03-13 14:17:12 +03:00
Simon Ogorodnik 48fb3db7ba Fix inserting variable name suggestion on non-enter char typing
#KT-21933 fixed
2018-03-13 12:51:29 +03:00
Mikhail Glukhikh d5d9aa0329 GotoSuperActionHandler: minor refactoring 2018-03-13 10:58:24 +03:00
Mikhail Glukhikh ab30275f14 Navigation: add expect declarations as supers #KT-16892 Fixed 2018-03-13 10:40:54 +03:00
Mikhail Glukhikh 849f9fc5c1 Navigation: add actual declarations as implementations (KT-16892) 2018-03-13 10:40:52 +03:00
Ilya Gorbunov 3530d9b4c7 Download org.jetbrains:markdown:0.1.25 from bintray 2018-03-13 09:50:10 +03:00
Svyatoslav Scherbina d3ab86db48 Fix access to scoped symbol table when inserting implicit casts to IR 2018-03-13 09:46:32 +03:00
Dmitry Petrov d38258d7a0 Use specified comparison generator for chars in optimized ranges
Otherwise if Char value is a result of some erased generic call,
coercing it to I (primitive int) causes CCE at run-time.

 #KT-23104 Fixed Target versions 1.2.40
2018-03-13 09:34:10 +03:00
Ilya Gorbunov 2891a6c954 Do not use java.home system property to locate JDK dependencies
It may point either to JDK/bin or to JRE/bin. Instead use JDK_16 and JDK_18 paths.
2018-03-13 08:52:15 +03:00
Ilya Gorbunov 6955cabbba Improve KPropertyN documentation
Provide missing documentation for Getter and Setter of KProperty1/2.
Fix the link to the 'getExtensionDelegate' extension.
2018-03-12 23:17:38 +03:00
Sergey Igushkin 07b811460a Deal with unnamed Gradle inputs/outputs
Fix the only unnamed input added to a Gradle task at runtime.
Add a test that checks for unnamed task inputs.

Issue #KT-23085 Fixed
2018-03-12 21:54:03 +03:00
Alexey Tsvetkov 97700316f5 Replace compileOnly with testCompileOnly in :generators
In Gradle testCompileOnly configuration does not extend compileOnly.

Since :generators project does not have main source set,
compileOnly dependencies have never worked.

Instead "kotlin-reflect" was resolved transitevely trough
:compiler:frontend.script module (a runtime dependency becomes
a compile transitive dependency).

In ccd6263787 I replaced `runtime` dependency
on "kotlin-reflect" with `runtimeOnly` breaking `:generators:compileTestKotlin`.
2018-03-12 20:07:31 +03:00
Sergey Igushkin 32df9c00ee Update literals in the grammar reference
Add missing long literal suffix
Add binary integer literals
Introduce IntegerLiteral lexer rule, which is closer to the actual lexer

Issue #KT-22713 Fixed
2018-03-12 18:02:22 +03:00
Sergey Igushkin 41044cd277 Fix the rule for valueArguments 2018-03-12 18:02:08 +03:00
Alexey Belkov 4b5b9b40e7 Grammar: Fix "object" rule (KT-22676) 2018-03-12 18:02:08 +03:00