Commit Graph

84365 Commits

Author SHA1 Message Date
Yahor Berdnikau c816d6f2e5 Modify file exists assertion.
Additionally allow to check if file exists in any location, even outside
of the project.

^KT-45745 In Progress
2021-07-26 14:27:47 +02:00
Yahor Berdnikau 18d74e62a6 Add additional shortcuts for common project files.
^KT-45745 In Progress
2021-07-26 14:27:47 +02:00
Yahor Berdnikau 35677f4727 Add random hash to the tempDir project dir.
This will allow to create several similar projects from one resource
project in a single test.

^KT-45745 In Progress
2021-07-26 14:27:46 +02:00
Andrey Zinovyev 8a0941a85a [FIR] Report deprecations in qualified expressions 2021-07-26 14:50:54 +03:00
Mikhail Glukhikh 98bd6f5d3e Fix "implicit type" exception in FIR OptIn checker 2021-07-26 10:13:13 +03:00
Mikhail Glukhikh 2a6355b64c FIR: use coneType instead of coneTypeSafe in OptIn checkers 2021-07-23 23:59:01 +03:00
Mikhail Glukhikh 73539cf342 FIR: use symbols as base for OptIn-checkers 2021-07-23 23:59:00 +03:00
Mikhail Glukhikh cb847b945d FIR: use getAnnotationByClassId instead of getAnnotationByFqName 2021-07-23 23:58:59 +03:00
Mikhail Glukhikh 7cbea12c8a FIR: store all annotationContainers in checker context 2021-07-23 23:58:58 +03:00
Mikhail Glukhikh d020948933 FIR: support EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION... 2021-07-23 23:58:57 +03:00
Mikhail Glukhikh 543ce06d85 FIR OptIn: temporarily replace error USAGE with warning
This commit is required for FP test to pass,
because FP test does not see module -Xopt-in=... flags.
2021-07-23 23:58:56 +03:00
Mikhail Glukhikh 82f268d611 FIR: add EXPERIMENTAL_API_USAGE reporting 2021-07-23 23:58:55 +03:00
Mikhail Glukhikh 3235b09a92 FIR: introduce MutableCheckerContext to save performance 2021-07-23 23:48:19 +03:00
Denis.Zharkov b547870d71 Use unsigned version of short numbers in ZipImplementation
Because some two-byte represented numbers (like amount of files in the zip)
exceed 32767 (but less than 65534)
2021-07-23 21:38:46 +03:00
Denis.Zharkov ea5157cadc Change type of KotlinCoreEnvironment::projectEnvironment type 2021-07-23 21:38:45 +03:00
Denis.Zharkov d6adac8dd0 Move FastJarFileSystem to ProjectEnvironment and link to the root disposable 2021-07-23 21:38:45 +03:00
Denis.Zharkov 3afed7f972 Fallback to CoreJarFileSystem when JDK doesn't support buffers unmapping 2021-07-23 21:38:43 +03:00
Denis.Zharkov c6525974d0 Move handlers cache from static field to the instance of FastJarFileSystem 2021-07-23 21:38:43 +03:00
Denis.Zharkov 03e5dc6117 Force unmapping MappedByteBuffer
Otherwise, on Windows daemon might hold mapped regions for some time
(until those objects are collection) and during the time those file become
locked (it's impossible to modify or remove them)

Reflection/Unsafe of course is not a cool thing to use, but JDK still
(already for 18 years) doesn't have public API for this

See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4724038
And https://stackoverflow.com/questions/2972986/how-to-unmap-a-file-from-memory-mapped-using-filechannel-in-java
2021-07-23 21:38:42 +03:00
Denis.Zharkov 4e11c670c6 Clear cleanFileAccessorsCache for FastJarFileSystem 2021-07-23 21:38:41 +03:00
Denis.Zharkov 7ca2a83f08 Use native endian mode from MappedByteBuffer 2021-07-23 21:38:40 +03:00
Denis.Zharkov 33cf058b55 Use MappedBuffer for FastJarFileSystem implementation 2021-07-23 21:38:40 +03:00
Denis.Zharkov 8f06e59d3b Implement new faster version of Jar virtual file system
It's only enabled by default in FIR and might be turned on with a CLI flag

The main idea is that default FarFS re-read ZIP file list each time when
class file is requested that is quite slow.
We read it once and them reading bytes from the known offset.

Also, unlike the default version we don't perform attributes check on each access
On the one hand, it works faster on the other it might not notice that one
of the JAR has been changed during compilation process
But looks like it's not supposed to be a frequent even during
compilation of a single module
2021-07-23 21:38:38 +03:00
Dmitriy Novozhilov 559e7d223a [FIR] Add friends path from Module in CLI compiler 2021-07-23 17:28:42 +03:00
Dmitriy Novozhilov d9d2a9cc31 Move BuildSessionLoggerTest to :kotlin-gradle-plugin tests
There was a problem that :kotlin-gradle-statistics:test can not be
  properly imported and kotlin stdlib wasn't accessible in it. I didn't
  find a way to fix it in :kotlin-gradle-statistics module, so I just
  moved tests from it to others gradle plugin tests
2021-07-23 17:15:55 +03:00
Anton Bannykh a7549be95e JS IR IC: report cache validataion duration when up-to-date 2021-07-23 17:10:07 +03:00
Anton Bannykh 4cee44cd6e JS IR IC: add a flag for DCE hack
The deserialized PIR does not support declaration mutation.
Until that's fixed the associatedObject removal optimization
has to be disabled.
2021-07-23 17:10:07 +03:00
Anton Bannykh 508d3bd9c0 JS IR IC: IC data may reference additional original declarations
Function types, which are created on the fly from lowerings are one such example.
2021-07-23 17:10:06 +03:00
Anton Bannykh fa21132704 JS IR IC: fix order storage
Some classes don't survive till the end. Their declaration lists
need to be stored nevertheless.
2021-07-23 17:10:06 +03:00
Anton Bannykh c6ab195a87 JS IR IC: invalid loops references exist after lowerings 2021-07-23 17:10:04 +03:00
Anton Bannykh 0130d18ea9 JS IR IC: deserialization fix 2021-07-23 17:10:03 +03:00
Anton Bannykh 058ca16af7 JC IR IC: correct signatures for function types created during lowerings 2021-07-23 17:10:02 +03:00
Anton Bannykh 8553c6ef58 JS IR IC: pass through more compiler flags 2021-07-23 17:10:02 +03:00
Yahor Berdnikau 5dc6e1b473 Fix no duplicate strategy was set for compilation with 'withJava()'.
In such case Kotlin jvm compilation has additionally java resource dir
that points to the same location. So ProcessResources task copies same
file twice. Fixed by setting ignore duplicates strategy.

^KT-46978 Fixed
2021-07-23 14:03:57 +00:00
Nikolay Krasko 83023c2073 Remove 202 platform support in build scripts 2021-07-23 16:58:28 +03:00
Nikolay Krasko ec99585eb9 Remove explicit registration of classFileDecompiler EP and core.xml 2021-07-23 16:58:27 +03:00
Nikolay Krasko 1b3046a61b Cleanup 202 bunch files
Leave 202 in .bunch file to give some time for updating build server
2021-07-23 16:58:26 +03:00
Nikolay Krasko 000a437315 Update .bunch file after 202 -> 203 switch 2021-07-23 16:58:25 +03:00
Nikolay Krasko bba0dfb469 Cleanup as42 bunch files
We don't build AS42 plugin from main kotlin repo anymore.
2021-07-23 16:58:24 +03:00
Dmitry Petrov 34f5b85ae5 IR KT-47840 fix-point solution for closure conversion 2021-07-23 14:58:23 +03:00
Jinseong Jeon e9f2d574d5 FIR IDE: simplify HL APIs for PsiType
The idea is to convert `KtType` to `PsiType`, along with the given
`PsiElement` context, instead of providing individual API to convert
different psi source to `PsiType`. To that end, we need to
migrate/rewrite some APIs/implementations that retrieve `KtType` from
different source of `PsiElement`.
2021-07-23 13:28:14 +02:00
Jinseong Jeon f02f3c76ae FIR IDE: API to resolve KtTypeReference to KtType 2021-07-23 13:28:11 +02:00
Jinseong Jeon 5358d4f07c FIR IDE: construct function type from a function as PsiType 2021-07-23 13:28:05 +02:00
Jinseong Jeon f19a501cc7 FIR IDE: common super type of given KtExpression's 2021-07-23 13:27:59 +02:00
Jinseong Jeon 5690b4d8c2 FIR IDE: get the return type of KtDeclaration as PsiType 2021-07-23 13:27:57 +02:00
Konstantin Tskhovrebov de4c2d35ab Assemble fat framework if Xcode requires several architectures.
#KT-47653
2021-07-23 11:00:35 +00:00
Konstantin Tskhovrebov 68a3c5f378 Use 'ARCHS' Xcode env for assembleAppleFramework task registration.
#KT-47653
2021-07-23 11:00:34 +00:00
Konstantin Tskhovrebov 414e735a67 Move native target definition by sdk and arch from Cocoapods to MPP plugin.
#KT-47653
2021-07-23 11:00:34 +00:00
Dmitriy Novozhilov 9b00776dba [FIR] Create CFG node for ::class calls 2021-07-23 12:20:39 +03:00
Yahor Berdnikau c5ce52eef5 Configure Android SDK in new test dsl. 2021-07-23 08:11:03 +00:00