Commit Graph

95 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 0e90d538df FIC: propagate info about conversions for deserialized classes 2020-01-17 19:36:08 +03:00
Dmitriy Dolovov 5803fcdeb4 Bugfix: KotlinIdeaResolutionException on absent/corrupted KLIB artifact
Issue #KT-35839
2020-01-09 17:13:54 +07:00
Dmitriy Dolovov 59e84e826b Fast check of Kotlin/Native KLIBs by virtual files 2019-12-25 11:42:14 +07:00
Zalim Bashorov 646c7ad0af [IDE, klib] Support in IDE klibs with dynamic type 2019-12-17 22:06:55 +03:00
Dmitry Gridin 09bcfab047 KotlinNativeModuleConfigurator: fix INRE
#EA-219416 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Savvinov f45c11c6f2 Use constantSdkDependencyIfAny in getKeyForSdk as well 2019-12-13 19:11:02 +03:00
Dmitriy Dolovov 5b8be16f13 Kotlin/Native IDE plugin clean-up
- Re-organize classes
2019-12-13 15:52:25 +03:00
Dmitriy Dolovov 36ed29d4d5 Convert KotlinNativeMetaBinary from Java to Kotlin 2019-12-13 15:52:17 +03:00
Dmitriy Dolovov 511a4089ca Kotlin/Native IDE plugin clean-up
- Drop KotlinNativeMetadataVersion in favor of KlibMetadataVersion
- Drop KotlinNativeProtoBasedClassDataFinder in favor of KlibMetadataClassDataFinder
2019-12-13 15:52:10 +03:00
Dmitriy Dolovov deb4025987 Fix: Use more precise KLIB compatibility check (by metadata version)
Issue #KT-34811
2019-12-13 15:51:54 +03:00
Alexander Gorshenev b0f077ff4b Plumbing KlibMetadataVersion and KlibIrVersion values to klib manifest 2019-11-30 18:37:38 +03:00
Dmitry Savvinov 0dc7c37b62 Choose SDK consistently at least for non-COMPOSITE analysis
In COMPOSITE analysis we don't have a constant SDK dependency for whole
ResolutionFacade, so we have to find it manually via calling
'findSdkAcrossDependencies'

In SEPARATE mode we do have such a constant SDK dependency, but there
was an assumption that it doesn't make a difference (i.e.
findSdkAcrossDependencies always return the same SDK as passed constant
one)

Turns out that assumption was wrong, particularly for projects with
duplicate SDK entries in project structure. Then we would choose one SDK
in some cases, and the other one on other cases - even though they a
bit-to-bit equal, we will create separate descriptors for them, which
might lead to some issues, like in KT-34802

^KT-34802 Fixed
2019-11-21 18:56:49 +03:00
Dmitriy Dolovov 1b2091d536 Fix: KLIB reading error on Windows
Issue #KT-34909
2019-11-14 20:37:43 +07:00
Kirill Shmakov 72591e34b3 Support android_x64/86 in cinterop definitions 2019-10-31 18:35:06 +03:00
Kirill Shmakov c7bd6d8ede Support watchos and tvos in cinterop definitions 2019-10-30 22:14:38 +03:00
Dmitriy Dolovov 905823fb1d Fix: Notify user in IDE on K/N KLIBs with incompatible ABI version
Issue #KT-34159
2019-10-25 11:10:46 +07:00
Dmitriy Dolovov 8ffc58a77d Fix: Don't index and decompile incompatible .knm files from K/N KLIBs
Issue #KT-34159
2019-10-25 11:10:40 +07:00
Dmitriy Dolovov 9c887c1e79 Fix: Don't analyse incompatible K/N KLIBs in IDE
Issue #KT-34159
2019-10-25 11:10:34 +07:00
Dmitriy Dolovov 2bc0a3c9c0 Fix KNPE after calling completion in native targeted filesIssue KT-34158 Fixed 2019-10-08 18:27:23 +07:00
Yan Zhulanow 8f4063b36c Implement test icon provider for 'native' platform 2019-10-08 18:17:05 +09:00
Dmitriy Dolovov df6dcd646f Fix ClassCastException in KLIB reader 2019-10-01 17:38:57 +03:00
Dmitriy Dolovov 5985c0c02b KLIB API constants clean-up 2019-10-01 17:38:57 +03:00
Dmitriy Dolovov 781c73335d Use cache everywhere where K/N KLIBs are read in IDE 2019-10-01 17:38:57 +03:00
Dmitriy Dolovov 185b10fa06 Rename module capability: "KotlinLibrary" -> "KotlinNativeLibrary" 2019-10-01 17:38:57 +03:00
Alexander Gorshenev c227c13799 Commonizing klib metadata between native and js 2019-10-01 17:38:57 +03:00
Alexander Udalov c007f3efb3 Minor, move lazyClosure out of TypeUtils.kt 2019-08-12 14:57:21 +02:00
Dmitry Savvinov 2b4d70fcf0 [Resolve] Rewrite how built-ins are created
Under COMPOSITE mode we don't have a globally known way to create
built-ins, instead, we have to create them on per-module basis.

So, in this commit we:

1. Use builtInsProvider: (ModuleInfo) -> KotlinBuiltIns instead of
precomputed builtIns instance, in order to be able to calculate
builtIns on per-module basis

2. Introduce new entity, called BuiltInsCache, which, roughly
speaking, is a map of form ModuleInfo -> KotlinBuiltIns, to prevent
creation of multiple builtInsInstances
NB. Actually, it's of form BuiltInsCacheKey -> KotlinBuiltIns, because
we shouldn't create new builtIns for each module. Also, currently,
each platform has its own BuiltInsCacheKey implementation, because
parameters by which built-ins are created, are a bit different across
different platforms. Ideally, we should eliminate those differences
and they use one concrete implementation as a key.
2019-07-30 12:41:40 +03:00
Dmitry Savvinov 90cf9daff3 [Resolve] Abstract creation of platform-specific package fragment providers 2019-07-30 12:41:40 +03:00
Dmitry Savvinov b48218e722 [Resolve] Make ResolversForModule less static
As consequence, remove IdePlatformKindTooling.resolverForModule, because
it became more than just field, and it duplicates similar API in
IdePlatformKindResolution anyways
2019-07-30 12:41:40 +03:00
Kirill Shmakov 12a1b0296b Clean up useless code 2019-07-24 18:25:11 +03:00
Dmitriy Dolovov 1d3b1ed0cb CIDR: Filter aux library order entries that do not represent K/N libraries
Issue #KT-32726 Fixed
2019-07-17 22:37:42 +07:00
Nikolay Krasko b7c12014ee Modify dependencies for 192 branch: more dependencies to full java plugin 2019-06-26 14:11:23 +03:00
Nikolay Krasko beb1bc09d4 Update to 192.5118.30 2019-06-25 11:48:59 +03:00
Alexander Podkhalyuzin c853ae49a2 Faster startup avoiding unnecessary class loading 2019-06-18 12:08:04 +02:00
Vyacheslav Gerasimov 5a39c637c2 Build: Fix intellij dependency leak from ir tree module 2019-06-13 21:03:55 +03:00
Dmitry Savvinov 9d0f518d62 Rename PlatformDependentCompilerServices -> PlatformDependentAnalyzerServices 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 2d528c6396 [Platform API] Remove IdePlatform, use TargetPlatform instead 2019-05-28 13:08:07 +03:00
Dmitry Savvinov d5fbe59a3e [Platform API] Introduce fundamental abstraction of Platform
This is a large commit, which introduces general API for working with
abstraction of Platform.

- Add new abstraction to 'core' - SimplePlatform - which represents
exactly one platform
  - Clients are strongly prohibited to create instances of SimplePlatform
  by hand, instead, corresponding *Platforms abstraction should be used
  (e.g. JvmPlatforms, JsPlatforms, KonanPlatforms)

- Move TargetPlatform to 'core', it represents now a collection of
SimplePlatforms
  - Clients are strongly encouraged to use TargetPlatform
    (not SimplePlatform) in API, to enforce checks for multiplatform

- Provide a helper-extensions to work with TargetPlatform
(in particular, for getting a specific component platform)

- Remove MultiTargetPlatform in favour of TargetPlatform
  - Notably, this commit leaves another widely used duplicated abstraction,
    namely, IdePlatform. For the sake sanity, removal of IdePlatform is
    extracted in the separate commit.
2019-05-28 13:08:07 +03:00
Dmitry Savvinov f2a0a809f1 [Platform API] Split TargetPlatform into lightweight TargetPlatform and CompilerServices
This decouples simple data (TargetPlatform) from other subsystem-specific
logic (like default imports, built-ins, etc.).

Aside from purely aesthetic improvements, it also makes it easier
to move 'TargetPlatform' into core (see next commits)
2019-05-28 13:08:06 +03:00
Dmitry Savvinov 83914614b9 [Platform API] Clean-up some usages of Platform
Mostly unused imports. Also, in some places,
TargetPlatform/MultiTargetPlatform were just passed around without
actually using (e.g. in deserialization)
2019-05-28 13:08:06 +03:00
Dmitry Savvinov 520e871280 Rename *AnalyzerFacade to *ResolverForModuleFactory to prevent confusion with other similar names 2019-05-28 13:08:06 +03:00
Kirill Shmakov 362e056b18 Expand acronym for K/N definitions file 2019-05-27 15:58:04 +03:00
Dmitriy Dolovov c017ef9bc8 Properly detect Kotlin/Native libraries
Issue #KT-30598 fixed
2019-04-30 13:05:22 +07:00
Dmitry Gridin 79793a4bda Replace deprecated classes with parent 2019-04-25 19:47:38 +07:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Kirill Shmakov fe9236f91e Add key 'module' into interop definitions file 2019-03-07 19:42:32 +03:00
kirill.shmakov 566dac8599 Correct suppress directive 2019-02-04 09:48:03 +03:00
kirill.shmakov 6c8b3d03fd Add syntax highlighting for *.def files 2019-02-01 16:34:00 +03:00
Vyacheslav Gerasimov 38d836dece Build: Don't instrument NotNulls during form instrumentation 2018-12-26 16:39:24 +03:00
Dmitriy Dolovov 33d89005b7 K/N fix: Built-ins initialization refactoring
- Use language settings from IDELanguageSettingsProvider
- Don't use dependencies of root modules to looks up for K/N stdlib
2018-12-06 19:05:17 +07:00