Commit Graph

8883 Commits

Author SHA1 Message Date
Natalia Ukhorskaya 40c4022c98 Debugger tests: add custom library 2014-08-27 15:57:57 +04:00
Alexander Udalov b0cb4c330f Don't try to read binary data from a non-class file
Fixes EA-59470, where a virtual file is checked to be a compiled Kotlin class
from the decompiler (which doesn't check its FileType)
2014-08-27 14:07:24 +04:00
Alexander Udalov 7dd0613f96 Fix NoErrorsInStdlibTest
stdlib was analyzed with an older version of itself in the classpath. But
without that older version stdlib still depends on a built-in part
(builtins, runtime.jvm, reflection), so we compile those as a separate library
beforehand
2014-08-26 21:12:09 +04:00
Nikolay Krasko 186a9a13a8 Report unmet trait requirements in IDE
#KT-3006 Fixed
2014-08-26 14:42:29 +04:00
Alexander Udalov e14ec050b4 Minor, update obsolete message in JetTestUtils 2014-08-25 19:11:53 +04:00
Alexander Udalov 8bdad92eff Minor, fix warnings and inspections in JetTestUtils 2014-08-25 19:05:30 +04:00
Alexander Udalov 087eec4521 Regenerate tests after recent generator improvements 2014-08-25 19:00:09 +04:00
Alexander Udalov fb3ef047fc Test generator: inline the constant FQ name 2014-08-25 19:00:04 +04:00
Alexander Udalov d5d4cff701 Minor, remove dependency of everything on "descriptor.loader.java"
Everything already depends on "frontend.java" which exports
"descriptor.loader.java"
2014-08-25 17:53:18 +04:00
Alexander Udalov 2ea9a2cfc9 Generate annotations on enum entry constants in bytecode
#KT-5665 Fixed
2014-08-25 17:50:08 +04:00
Pavel V. Talanov b749beb5fa Fix AnalyzerFacadeForJvm reference in GenerateInjectors 2014-08-23 12:46:31 +04:00
Pavel V. Talanov 7a1d5d63dc Rename: AnalyzerFacadeForJvm(Js) -> TopDownAnalyzerFacadeForJvm(Js) 2014-08-22 23:16:55 +04:00
Pavel V. Talanov 46f1873dc8 JDR: drop various code that is marked as temporary
Remove additional logic for comparing files in JavaClassFinderImpl
Drop redundant check for builtins in findClassInJava(FqName)
Drop resolve cache query in LazyJavaClassMemberScope and LazyJavaPackageFragmentScope
2014-08-22 22:59:07 +04:00
Pavel V. Talanov db5303c019 Implement modules in IDE
IDE:
Rewrite AnalyzerFacade and implementations for JS and JVM to support creating separate analyzers for each module
Introduce ModuleInfo which is an intermediate entity between configuration (tests or idea modules) and ModuleDescriptor
Implement IdeaModuleInfos which represent IDEA modules, sdks and libraries
Add (somewhat thin) test checking their behaviour
Implement getModuleInfo() - utility to obtain IdeaModuleInfo for PsiElement
Drop Project.getLazyResolveSession() - not possible to obtain resolve session for the whole project any more
Adjust JavaResolveExtension accordingly
KotlinSignature Intention/Marker - make sure that analyzed element is cls element (he's not in resolve scope otherwise)

LightClasses:
Create separate package light classes for each module
Java code can only reference light class from the first module among it's dependencies
Duplicate jvm signature is only reported on package declarations inside one module

Injectors:
Receive GlobalSearchScope as paramer for VirtualFileFinder and JavaClassFinder
which allows to narrow analyzer scope

JDR:
Introduce ModuleClassResolver resolves java classes in correct java descriptor resolver (corresponding ModuleDescriptor)
Add test checking that java classes belong to correct module

Debugger:
Provide context to analyze files created by debugger in

Converter:
Postprocessor now needs a context to analyze resulting code in

JetPsiFactory:
Add verification that files created by psi factory are not analyzed without context (that is almost never a good idea)

Other:
Use new API in various tests, utilities, run configuration producers and builtin serializers
Various "TODO: (module refactoring)" which mark the unfinished parts
2014-08-22 22:58:54 +04:00
Pavel V. Talanov 3418d15590 Avoid redundant wrapping in SyntheticFilesFilteringScope 2014-08-22 14:35:53 +04:00
Pavel V. Talanov 77416aba5f Add dependency on intellij-core explicitly
util module doesn't export intellij-core dependency
2014-08-22 13:09:08 +04:00
Nikolay Krasko dbdc30fd94 Ignore decompiler problem, just show trouble declarations 2014-08-21 17:57:19 +04:00
Andrey Breslav 1933e30905 Test data split between compiledJava tests and compiledKotlin tests
Basically, this commit splits test data from the from java-txt-kt to two pairs java-txt and kt-txt.
This commit leads to some duplication in test data.
This is temporary: in the platform types branch the test data for LoadJava tests will be changed dramatically, so duplication will go away
2014-08-21 12:22:22 +04:00
Denis Mekhanikov 1533c0e9f3 Support more than 32 default arguments
#KT-4675 Fixed
2014-08-20 20:47:34 +04:00
Alexander Udalov 3ada0ce0a9 Fix kotlinc scripts on Cygwin 2014-08-20 15:25:45 +04:00
Evgeny Gerashchenko 487f381287 Minor. Renamed and cleaned CompilerServices -> Services. 2014-08-20 13:46:31 +04:00
Evgeny Gerashchenko fe27b2264a Passing condition to prefer parent class loader as a parameter to preloader. 2014-08-20 13:46:30 +04:00
Evgeny Gerashchenko f3b7ae379f Passing services via type-safe container instead of map. 2014-08-20 13:46:30 +04:00
Evgeny Gerashchenko 184ddbc9e1 Removed passing incremental cache base dir via module script. 2014-08-20 13:46:29 +04:00
Evgeny Gerashchenko cda1be3fc7 Minor. Added toString() to CompilerConfiguration. 2014-08-20 13:46:29 +04:00
Evgeny Gerashchenko 6dd56a08bd Removed storing module ids in incremental caches. 2014-08-20 13:46:28 +04:00
Evgeny Gerashchenko 3233317316 Passing class loader instead of factory to compiler. 2014-08-20 13:46:27 +04:00
Evgeny Gerashchenko e419c1a604 Moved incremental cache API to separate package. 2014-08-20 13:46:27 +04:00
Evgeny Gerashchenko 5fade9a5a6 Made incremental cache per-module.
Reused IDEA framework which manages per-module storage.
2014-08-20 13:46:26 +04:00
Alexey Kudravtsev 44084de3be removed code already contained in JavaCoreApplicationEnvironment 2014-08-20 11:38:05 +04:00
Alexey Kudravtsev 945209567e moved some components registration from registerProjectServices() to registerProjectServicesForCLI() since they don't work in Upsource 2014-08-19 17:12:07 +04:00
Alexander Udalov eab0342d39 Remove TestOnly annotation from JetScope#printScopeStructure
Because this method is located in core/ which will be present at runtime, and
this annotation is not needed at runtime
2014-08-19 12:10:30 +04:00
Alexander Udalov df554e7c53 Remove dependency of "descriptors" on Function/Condition/Processor 2014-08-19 12:10:24 +04:00
Alexander Udalov cc4a67da71 Minor, change JVM runtime's Implementation-Title
It's not a compiler runtime, but rather a runtime for Kotlin apps
2014-08-18 15:01:28 +04:00
Pavel V. Talanov 09d3ddfcae Introduce VirtualFileFinderFactory
Allow creation of VirtualFileFinder with restricted scope
2014-08-15 15:22:19 +04:00
Pavel V. Talanov 331f24d01a Use VirtualFileFinder.SERVICE in InlineCodegenUtil 2014-08-15 15:22:17 +04:00
Pavel V. Talanov bc6c56080d Rewrite VirtualFileKotlinClassFinder to Kotlin 2014-08-15 15:22:16 +04:00
Pavel V. Talanov 15028b76ef Always provide not null project in scope for JavaClassFinderImpl 2014-08-15 15:22:14 +04:00
Alexander Udalov 99d4f97aef Fix access to top level delegated property from another property
#KT-5612 Fixed
2014-08-14 10:43:50 +04:00
Alexander Udalov 9e971ed2b9 Minor, add test on enum assignability to kotlin.Enum 2014-08-13 17:19:56 +04:00
Alexander Udalov 226bfe65f0 Don't make traits and annotations inherit from KObject
#KT-5609 Fixed
2014-08-13 17:19:56 +04:00
Alexander Udalov 47d5f83d04 Report unmet trait requirements
#KT-3006 Fixed
2014-08-13 17:19:55 +04:00
Alexander Udalov 9c00e1c94d Scripts: coerce result to the actual expression type
#KT-5622 Fixed
2014-08-13 17:19:53 +04:00
Alexander Udalov 6e46bea821 Minor, rename local variable 2014-08-13 17:19:52 +04:00
Alexander Udalov 844845c6e3 REPL: sanitize stack traces
Don't include our compiler's and preloader's internal code, reflection, native
methods etc. Also delete "substring" matching logic from tests
2014-08-13 15:42:10 +04:00
Alexander Udalov 5beefac5bc REPL: display the original cause of InvocationTargetException 2014-08-13 15:13:25 +04:00
Alexander Udalov 6eb5567895 REPL: fix open parenthesis not triggering "incomplete"
Check if all of the syntax errors are at EOF, not that there's a single one.
In case of open parenthesis two syntax errors are reported for some reason
2014-08-13 15:13:25 +04:00
Alexander Udalov 4213ce318e REPL: don't fail on a callable reference
There should probably be a special kind of property, but at least it won't
throw an exception for now
2014-08-13 15:13:24 +04:00
Alexander Udalov 8d2ab0fd52 REPL: disable event expansion
Fixes problems with exclamation marks inside string literals. No tests added
because it's tedious to test REPL as it is (via ConsoleReader)

 #KT-3940 Fixed
2014-08-13 15:13:24 +04:00
Alexander Udalov d54871746e REPL: minor refactoring & reformat, fix warnings 2014-08-13 15:13:23 +04:00