Commit Graph

30626 Commits

Author SHA1 Message Date
Alexey Sedunov e11e27ff55 [REVERTED] 72a17b0 Alexey Sedunov on 2/21/2016 at 00:01 (committed on 3/24/2016 at 18:42)
Spring Support: Inspection for final Spring-annotated classes/functions
2016-03-29 19:17:09 +03:00
Alexey Sedunov ed9b1ac151 [REVERTED] 0a71eb7 Alexey Sedunov on 2/25/2016 at 14:02 (committed on 3/24/2016 at 18:42)
Spring Support: Implement Spring-specific references
2016-03-29 19:17:07 +03:00
Alexey Sedunov 95f6acdddf [REVERTED] 8c72b02 Alexey Sedunov on 3/21/2016 at 19:14 (committed on 3/24/2016 at 18:42)
Light Classes: Constant expression evaluator for light annotation arguments
2016-03-29 19:17:05 +03:00
Alexey Sedunov 4896d90c79 [REVERTED] 28b8cfc Alexey Sedunov on 3/22/2016 at 21:26 (committed on 3/24/2016 at 18:42)
Spring Support: Show Spring line markers for Kotlin classes
2016-03-29 19:17:04 +03:00
Alexey Sedunov bad1794577 [REVERTED] 0eda1f3 Alexey Sedunov on 3/14/2016 at 18:54 (committed on 3/24/2016 at 18:42)
Spring Support: SpEL injections
2016-03-29 19:17:02 +03:00
Alexey Sedunov 1970582dd8 [REVERTED] 2692a7d Alexey Sedunov on 2/21/2016 at 00:50 (committed on 3/24/2016 at 18:42)
Spring Support: Inspection for Spring configuration
2016-03-29 19:17:00 +03:00
Alexey Sedunov 124776643e [REVERTED] 86c551b Alexey Sedunov on 3/24/2016 at 19:21 (committed on 3/24/2016 at 19:23)
Misc: Сhangelog update
2016-03-29 19:16:59 +03:00
Alexey Sedunov bfcf7d2b1e [REVERTED] 2dd83b1 Alexey Sedunov on 3/25/2016 at 16:08 (committed on 3/25/2016 at 16:21)
Misc: Fetch Spring libraries to dependencies directory
2016-03-29 19:16:58 +03:00
Alexander Udalov 4a533168d9 Rework const val generation in multifile classes
Do not query MultifileClassCodegen#classBuilder early on: this causes the class
file for the facade to be prematurely dumped to the disk in some cases, when
that class file is not yet completely generated. Instead fork the logic in
PropertyCodegen#generateSyntheticMethodIfNeeded: save metadata in parts,
generate method in the facade
2016-03-29 17:53:32 +03:00
Alexander Udalov f31dca32a4 Flush stdout and stderr before shutdown in scripts
Although a test is present, it doesn't check the behavior because it seems that
in the test environment both streams are necessarily flushed

 #KT-9546 Fixed
2016-03-29 17:53:18 +03:00
Alexander Udalov be4b432778 Clarify KClass equality
#KT-11502 Fixed
2016-03-29 17:14:51 +03:00
Alexey Sedunov cbb6f7ed63 Generate equals()/hashCode(): Fix hashCode() implementation
#KT-11638 Fixed
2016-03-29 15:21:17 +03:00
Ilya Gorbunov 768da05ba9 Update dump declaration mappings tests to reflect new constant generation in multifile facades. 2016-03-29 14:34:32 +03:00
Ilya Gorbunov ce09612804 Write ReadMe about what constitutes the public API and what is an incompatible change 2016-03-29 13:50:08 +03:00
Ilya Gorbunov 8888537137 Reference dump of kotlin-runtime and kotlin-stdlib of 1.0.2-dev
New public implementation methods 'renderLambdaToString' which are called only from the same module.
2016-03-29 13:50:06 +03:00
Ilya Gorbunov 26e905e90e Reference dump of kotlin-runtime and kotlin-stdlib of 1.0.0 and 1.0.1 2016-03-29 13:50:04 +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
Ilya Gorbunov bd8c83bee2 Merge public static API of non-public base supertypes into public subtype 2016-03-29 13:49:44 +03:00
Ilya Gorbunov 472b386101 Tests for public API dump tool. 2016-03-29 13:49:43 +03:00
Ilya Gorbunov da032e371a Minor: refactoring 2016-03-29 13:49:41 +03:00
Ilya Gorbunov 88a038a0df Filter out nested classes in non-public outer classes. 2016-03-29 13:49:39 +03:00
Ilya Gorbunov a9fd1de263 Tool to dump binary API signatures from compiled JAR.
Incorporate declaration mappings output from the compiler to take into account kotlin visibilities.
2016-03-29 13:49:38 +03:00
Ilya Gorbunov 25abdf9fdb Tests for declaration mappings dumping from compiler 2016-03-29 13:49:36 +03:00
Ilya Gorbunov e7d75fccd6 Introduce compiler option to dump declaration mapping. 2016-03-29 13:49:34 +03:00
Ilya Gorbunov 4e49187549 Dump declaration mapping during codegen process. 2016-03-29 13:49:33 +03:00
Natalia Ukhorskaya 68907d05c3 J2K produces unresolved 'toArray' calls for java Collection#toArray(T[])
#KT-11600 Fixed
2016-03-29 11:26:18 +03:00
Alexander Udalov a8bebeb48d Load annotations of const properties from multifile classes
Rework backing field generation logic in PropertyCodegen to switch the
ClassBuilder instance for a multifile part to that of the corresponding facade
class. This became needed because multifile parts, and their metadata, are
generated _before_ the multifile facade class and otherwise we would never
record that there's a synthetic '$annotations' method for a const val and would
not write that to the protobuf message for the property.

See also bad83200

 #KT-10892 Fixed
2016-03-28 21:11:14 +03:00
Alexander Udalov 6924d883eb Support reflection calls to multifile class members
#KT-11447 Fixed
2016-03-28 21:11:14 +03:00
Mikhail Glukhikh 9fa101b3fe Changelog: 1.0.1-2 added 2016-03-28 20:22:36 +03:00
Mikhail Glukhikh a541aaafd8 Protected in final inspection: protected modifier is effectively private in final classes #KT-6674 Fixed 2016-03-28 19:03:16 +03:00
Mikhail Glukhikh 20bac6178c Array in data class inspection: warning on array properties in data classes #KT-10299 Fixed 2016-03-28 19:00:16 +03:00
Yan Zhulanow 047828bd6d Fix EA-79598: getNode() in JspxImportListImpl returns null 2016-03-28 14:43:07 +03:00
Alexander Udalov a6610d1b0c Drop obsolete JVM intrinsics, rename JavaClassArray -> ArrayOf 2016-03-28 14:24:23 +03:00
Alexander Udalov d62535c388 Minor, drop unnecessary workaround of obsolete issue 2016-03-28 14:14:56 +03:00
Alexander Udalov a8e6a9c828 Minor, add JDK to multi-module Java analysis test 2016-03-28 14:14:55 +03:00
Alexander Udalov 2dab56db8e Do not report "incomplete hierarchy" in decompiler
It's fine if the decompiler can't find some classes; it won't do anything
except render their FQ names which are fully available
2016-03-28 14:13:59 +03:00
Alexander Udalov 8d64ed7f3f Do not produce error classes for not found annotations 2016-03-28 14:13:59 +03:00
Alexander Udalov e915e1548c Fix multiple 'unresolved java classifier' errors
Use the same component (NotFoundClasses) as in loading of compiled Kotlin
symbols.

Some tests were changed to avoid a diagnostic that is now reported when a
non-found class is encountered in a signature (e.g. staticMethod.1.java where
JDK seems to be not configured)

 #KT-10493 Fixed
 #KT-10820 Fixed
 #KT-11368 Fixed
2016-03-28 14:13:59 +03:00
Alexander Udalov 873cf439de Drop MissingDependencyErrorClass and related code
No longer needed because of the proper support for missing classes in
deserialization (see NotFoundClasses.kt)
2016-03-28 14:13:59 +03:00
Alexander Udalov db5e00bcc0 Report error if some deserialized classes are missing in dependencies
Technically we often can compile code which uses missing classes (as long as
nothing is called on them) but it seems better to let the user know something's
wrong in their setup before the error manifests itself at runtime. Also the
Java compiler does the same

 #KT-4328 Fixed
2016-03-28 14:13:59 +03:00
Alexander Udalov accf80a624 Do not create error types in deserialization on not found classes
For a class which cannot be resolved in the current deserialization session,
create a special ClassDescriptor instance with an empty scope and put in the
correct package under the current module. Codegen will perfectly map such class
to its JVM signature (because only the precise FQ name is needed, which is
available). For more details on this approach, see the issue description.

 #KT-4328 Fixed
 #KT-11497 Fixed
2016-03-28 14:13:59 +03:00