Commit Graph

21947 Commits

Author SHA1 Message Date
Mikhail Glukhikh 7d62e3ce56 FIR: fix hasTopLevelClassOf optimization in deserialized provider
Before this commit, we answered 'no top level class' if Java class finder
could not calculate known class names. However, it's incorrect,
because this situation means 'don't actually know'.

To precise semantics, function name was also inverted
2019-12-10 12:58:39 +03:00
Mikhail Glukhikh fa89aa0b49 Do not use member scope provider from FIR resolution API
In this commit we build self importing scope from scratch.
Using member scope provider is probably incorrect because of possible changes.
At any invalidation we should rebuild it.
2019-12-10 12:58:39 +03:00
Mikhail Glukhikh 718a679b72 FIR IDE API: add preliminary control of file in-block modifications
In this commit, we build FirFile from the beginning if in-block modifications are detected.
However, better way would be to rebuild only part of FirFile in this case
2019-12-10 12:58:39 +03:00
Mikhail Glukhikh 83ccd7dd1c FIR: implement separate diagnostic collector/reporter for IDE 2019-12-10 12:58:38 +03:00
Mikhail Glukhikh fbf1dbf2da FIR: introduce error message renderer 2019-12-10 12:58:38 +03:00
Mikhail Glukhikh cd089658bd IdeFirProvider: insert protection against ProcessCanceledException 2019-12-10 12:57:56 +03:00
Mikhail Glukhikh fc117466a8 AbstractFirPsiCheckerTest: do partial error diagnostic comparison for some cases 2019-12-10 12:57:15 +03:00
Mikhail Glukhikh 4b251eb986 FIR IDE: lock FIR files before calling runResolve on them
This also fixes various synchronization problems
2019-12-10 12:57:13 +03:00
Mikhail Glukhikh 63121df6ba Synchronized IdeFirProvider.getOrBuild file, don't share RawFirBuilder
Before this commit RawFirBuilder was reused,
that provoked a lot of synchronization problems
2019-12-10 12:57:13 +03:00
Mikhail Glukhikh ccb343e26b FIR: preliminary implementation of diagnostics highlighter (~30% supported) 2019-12-10 12:57:13 +03:00
Mikhail Glukhikh 34202faaa5 Code cleanup: KotlinPsiChecker 2019-12-10 12:57:12 +03:00
Mikhail Glukhikh 1d6d88b50c FIR reference resolve test: observe mute tests which are actually passing 2019-12-10 12:57:12 +03:00
Mikhail Glukhikh f8c86d2f9f FIR reference resolve test: mute 37/107 cases which aren't yet supported 2019-12-10 12:57:11 +03:00
Mikhail Glukhikh 900227fdfa KtReferenceResolver: implement resolveToPsiElements() via FE IR (~60% supported) 2019-12-10 12:57:11 +03:00
Mikhail Glukhikh 809b7d8381 FirResolution: store enabled value in field with initial reading from component
Before this commit, we read/wrote 'enabled' directly from PropertiesComponent.
Now we do only initial reading and then store modified value in field.
This should make 'enabled' reading faster.
2019-12-10 12:57:11 +03:00
Mikhail Glukhikh 0d2d76696c Add FirResolution.enabled wrapper 2019-12-10 12:57:10 +03:00
Natalia Selezneva b66fdad80c Set since build to IDEA 192.7142.36 for 192 bunch
Fix compilation in idea-gradle module
Android Studio 3.6 doesn't still contain some of those changes
2019-12-10 09:16:27 +03:00
Dmitriy Novozhilov b76c984b26 [FIR] Support IntegerLiteralTypes 2019-12-09 17:24:26 +03:00
Nicolay Mitropolsky df3bee3038 Annotations: support injections in string arrays (KT-35222) 2019-12-05 19:31:57 +03:00
Mikhail Glukhikh bef344b33e Optimization / clarifying: getFirClassifierContainerFile 2019-12-05 18:02:04 +03:00
Mikhail Glukhikh c1789a0ecc FIR IDE: synchronous creation/registration of sessions 2019-12-05 18:02:04 +03:00
Mikhail Glukhikh 1539ee30ff FIR IDE: fix local class containing file search 2019-12-05 18:02:03 +03:00
Mikhail Glukhikh d35a26a75b Optimization: introduce FirIdeResolveStateService to cache FirResolveState 2019-12-05 18:02:02 +03:00
Mikhail Glukhikh b4760bcbd3 Extract AbstractResolveElementCacheTest to use in FIR cache testing 2019-12-05 18:02:02 +03:00
Mikhail Glukhikh 8808c775a4 Introduce FirResolvedTypeRef.delegatedTypeRef to see children types in IDE
This is needed to have access to resolved children types (e.g. type arguments) from IDE
2019-12-05 18:02:02 +03:00
Vladimir Dolzhenko b0b04eb4cd Use kotlin specific setting "Optimize imports on the fly" in quick fix
#KT-35266 Fixed
2019-12-04 11:19:19 +01:00
Nikolay Krasko 29fbb8e22f Update to 193.5233.102 release (KT-35239)
- Mute android specific import tests (KT-35225).
- Mute GradleMultiplatformWizardTest (IDEA-225878).
- Minor update of test data.
2019-12-03 17:34:47 +03:00
Nikolay Krasko fa64b5794b Allow to mute parameterized GradleImportingTestCase JUnit 4 tests 2019-12-03 17:34:46 +03:00
Roman Golyshev 66ffdf1b2d KT-33979 KT-34150 Remove filtering overridden object members and nested objects
- ^KT-33979 Fixed
- ^KT-34150 Fixed
- Also, in extension completion check descriptor instance first
2019-12-03 13:29:30 +03:00
Alexander Udalov fd627603a0 Refactor CompilationErrorHandler
It only had one implementation THROW_EXCEPTION, inline it everywhere
with a call to a static method
2019-12-03 10:48:34 +01:00
Mikhail Glukhikh fe6be0f436 Fix failed FIR multi-module test (forgotten test data update) 2019-12-03 10:25:53 +03:00
Igor Yakovlev 0ff77bd3c5 Add UL support for const fields initializers
Fixed #KT-34081
2019-12-02 20:41:47 +03:00
Ilya Chernikov b8034567ef Change script definition lookup key from File to ScriptSource
to make it more generic and allow easier implementation fo the
non-file based scripts.
2019-12-02 16:46:54 +01:00
Nikolay Krasko 0380380de4 More cleanups after tests execution 2019-12-02 13:29:37 +03:00
Nikolay Krasko 0cbb3a3956 Remove unused ProjectRootModificationTrackerFixer.kt 2019-12-02 13:29:37 +03:00
Nikolay Krasko c12599a045 Fix test data for testParamTypeLambdaMismatch in >= 192 2019-12-02 13:29:36 +03:00
Andrey Uskov 38de98429d Fix importing tests in bunch 183 2019-12-02 13:17:21 +03:00
Andrey Uskov 9643d5d28e Added import-resolve integration tests 2019-12-02 13:17:17 +03:00
Vladimir Dolzhenko 7fede87825 Performance tests DSL is added 2019-12-01 22:54:00 +01:00
Vladimir Dolzhenko 1b075340f8 Fixed dependencies for performance tests 2019-12-01 09:35:32 +01:00
Vladimir Dolzhenko f8a6217fb5 Fix compilation for 183 after adding support incremental analysis of comment and kdoc
Relates to #KT-35189
2019-11-30 18:50:44 +01:00
Alexander Gorshenev b0f077ff4b Plumbing KlibMetadataVersion and KlibIrVersion values to klib manifest 2019-11-30 18:37:38 +03:00
Vladimir Dolzhenko a6f829f267 Add secondary ctors to incremental analysis
Relates to #KT-35121
2019-11-29 18:30:01 +01:00
Mikhail Glukhikh d15dae6ac6 FIR: use SyntheticPropertySymbol & synthetic scope instead of FirAccessorSymbol
Before this commit, we used FirAccessorSymbol to emulate synthetic properties.
These symbols were generated in Java use-site scope.
Now, we use synthetic scope instead which is above MemberScopeTowerLevel.
This is more performance-friendly and does not require override matching.
However, accessor symbols should be used in situation when Java accessor
overrides Kotlin property which is broken in this commit
(that's why MapEntry test is corrupted here).
Also, we should not create synthetics for pure Kotlin accessors
(that's why javaAccessorConversion test is corrupted here).
2019-11-29 18:11:25 +03:00
Mikhail Glukhikh f1eb0dff1f FIR: disable synthetic scope, make accessor symbols synthetic
Before this commit, we had two methods to do generally the same synthetic thing.
It's an attempt to keep only one of them.
Accessor symbols are generated in Java use-site member scopes,
at this place we know better whether we are in Java class or not.
However, we have to do this at every use-site level, which is relatively slow.
Also we could encounter problems when accessor function is overridden in Kotlin,
and accessor symbol can still contain reference to Java accessor.
2019-11-29 18:09:07 +03:00
Vladimir Dolzhenko 95129939d4 Add secondary ctors to incremental analysis
#KT-35121 Fixed
2019-11-29 15:45:09 +01:00
Vladimir Dolzhenko f709377735 Support incremental analysis of comment and kdoc
#KT-35189 Fixed
2019-11-29 15:44:58 +01:00
Vladimir Dolzhenko 29b25e3901 Reworked resolve references in background thread in PlainTextPasteImportResolver
Relates to #KT-16774
2019-11-29 15:27:20 +01:00
Dmitry Gridin 37371edb8c Auto-import: add quickfix for overloaded generic function
#KT-34667 Fixed
2019-11-29 21:09:24 +07:00
Dmitry Gridin 4b98430058 Formatter: fix line break after package & file annotation
#KT-23957 Fixed
2019-11-29 21:09:04 +07:00