Commit Graph

3055 Commits

Author SHA1 Message Date
Dmitriy Novozhilov e942e87feb [JS CLI] Fix == on strings with equals call 2023-01-30 09:29:58 +00:00
Yahor Berdnikau 45213e1468 Switch @GradleOption params to enum classes.
This should improve developers UX when using this annotation.
2023-01-29 20:59:28 +00:00
Ilya Goncharov 1150ec6882 [JS] Implementation dependencies for JS klibs
^KT-56158 fixed
2023-01-27 13:31:59 +00:00
Stanislav Ruban 4523535545 Deprecate -Xuse-k2 compiler flag in Gradle DSL
^KT-56239 Fixed
2023-01-27 12:42:50 +00:00
Sergey Bogolepov 0b4db4beca [K/N] Fix ALL phases value 2023-01-26 14:32:48 +00:00
Sergey Bogolepov 851d84a865 [K/N] Enable proper LLVM IR dump and verify actions
Also introduce -Xsave-llvm-ir-directory argument
that should be used instead of -Xtemporary-files-dir
as a location for LLVM IR from phases.
Motivation for this change: it is simpler to implement
and unties LLVM actions from the awful TempFiles class.
2023-01-26 14:32:48 +00:00
Stanislav Ruban 7e0f69b8de Introduce tweaks and wording changes related to LV2.0-specific CLI warnings
Fix merge conflict related to renaming of one of the tests

Regenerate tests affected by previous commit

Fix merge conflict related to renaming of one of the tests

Improve wording of the `-Xuse-k2 -language-version 1.*` CLI warning

Improve wording of LV2.0-specific CLI warnings some more

Fix output of one of the tests for -Xuse-k2 deprecation

Tweak wording of LV2.0-specific CLI warnings

* make it clear in every warning that -Xuse-k2 is deprecated
* add a reminder to remove -Xuse-k2 for `-Xuse-k2 -language-version 2.0`
* add both possibly wanted fixes for `-Xuse-k2 -language-version 1.*`

Remove deprecated -Xuse-k2 flag from one of the tests

Merge-request: KT-MR-8449
Merged-by: Stanislav Ruban <Stanislav.Ruban@jetbrains.com>
2023-01-26 11:55:03 +00:00
Ivan Kochurkin bf145ddee8 Extract common buildKotlinMetadataLibrary
Use it in FirMetadataSerializer and K2MetadataKlibSerializer
2023-01-24 15:27:15 +00:00
Ivan Kochurkin 1dde34b610 Extract common AbstractMetadataSerializer
With inheritors: MetadataSerializer, K2MetadataKlibSerializer, FirMetadataSerializer
2023-01-24 15:27:14 +00:00
Ivan Kochurkin 8a8823e81a Extract CommonAnalysisResult and use it in K2MetadataKlibSerializer and MetadataSerializer 2023-01-24 15:27:14 +00:00
Ivan Kochurkin 44b7859356 [FIR] Implement FIR metadata serialization
Add FirMetadataSerializer

Add CLI metadata tests on FIR
2023-01-24 15:27:14 +00:00
Ivan Kochurkin 04fc2bde96 [FIR] Extract resolveAndCheckFir to firUtils
Use it in compilerPipeline and FirKotlinToJvmBytecodeCompiler
2023-01-24 15:27:13 +00:00
Ivan Kochurkin 5f1ed56554 [FIR] Extract createFirLibraryListAndSession to cliCompilerUtils
Use it in compilerPipeline and FirKotlinToJvmBytecodeCompiler
2023-01-24 15:27:13 +00:00
Ivan Kochurkin e22359cc10 [FIR] Add MetadataSymbolProvider
Extract common code from K1 to MetadataUtil
2023-01-24 15:27:12 +00:00
Ivan Kochurkin c103da98dd [FIR] Add missing dependencies to :compiler:fir:checkers:checkers.native 2023-01-24 15:27:12 +00:00
Alexander Korepanov 1ec88ff560 [JS IR] Enable IR dump for IC invalidation tests
Support 'fd.kotlin.js.debugMode' property in IC invalidation tests.
2023-01-24 09:35:15 +00:00
Ilya Goncharov 7ae85ed68e [JS IR] Module descriptors depends on each other 2023-01-23 16:16:48 +00:00
Roman Efremov 14b4cdc7c4 Write "hasEnumEntries" flag into metadata when feature enabled
^KT-53929 Fixed
2023-01-23 12:53:04 +01:00
Vladimir Sukharev 195ecbac2e Serialize native klib extensions to pass most ObjCExport and CInterop tests.
Merge-request: KT-MR-8398
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-23 11:34:47 +00:00
Ilya Chernikov 7ec72b568d Fix assertion in light tree diagnostic reporter
happened then two diagnostics are reported on the same element.
#KT-55924 fixed
2023-01-20 17:57:15 +00:00
Mikhail Glukhikh c8db20bd0b Compiler: restore an opportunity to switch light tree mode OFF
#KT-55996 Fixed
2023-01-18 14:01:22 +00:00
Alexander Likhachev 4c2923f96f [IC] Support precise output backup for kapt stubs
#KT-49785 In Progress
2023-01-17 22:15:53 +00:00
Alexander Likhachev 742e240bdc [IC] Report messages with CompilerMessageSeverity.OUTPUT without grouping
#KT-49785 In Progress
2023-01-17 22:15:51 +00:00
Artem Kobzar 71486a321c [K/JS] Add support of compilation with ES-classes 2023-01-17 18:14:17 +00:00
Alexander Udalov 2a80e70860 Install jansi only when colors are enabled, add test
Also minor cleanup. Remove the comment about the issue jansi#35 because
although the issue is fixed, the behavior is correct right now: we
enable colors by default iff stderr is a TTY (and the platform is not
Windows), and to determine that we need to call `CLibrary.isatty`.

 #KT-55784
2023-01-17 16:59:51 +01:00
Loïc Mangeonjean 34947c9d7a Allow overriding ansi mode on PlainTextMessageRenderer
#KT-55784 Fixed
2023-01-17 16:59:51 +01:00
Alexander Korepanov 75931fb9c8 [JS IR IC] Do not read non modified JS into memory
Optimizaion: instead of reading all non modified JS files
 from the cache into the memory at once, the patch allows
 copying non-modified JS files from disk one by one
 during the compilation output writing routine.
2023-01-17 15:48:36 +00:00
Mikhail Glukhikh 70fc891260 K2: move -Xuse-k2 VS language version checks to CommonCompilerArguments 2023-01-16 18:16:49 +01:00
Mikhail Glukhikh 7a61578e08 Language version 2.0: fix compiler messages and minor details 2023-01-16 18:16:48 +01:00
Mikhail Glukhikh 0c4a0360ac Deserialization/class reading: pass chosen JvmMetadataVersion whenever possible 2023-01-16 18:16:07 +01:00
Mikhail Glukhikh 52ab565cc6 Move LANGUAGE_TO_METADATA_VERSION to compiler:frontend.common.jvm 2023-01-16 18:14:52 +01:00
Mikhail Glukhikh f6b8b3438a Extract & use GenerationState.metadataVersion helper 2023-01-16 18:12:55 +01:00
Mikhail Glukhikh 3dc05f4ec5 Introduce language version 2.0 and associate K2 compiler with it 2023-01-16 18:12:55 +01:00
Ilya Chernikov a29c418b63 Add missing platform core hack to use nio2, avoids warning on Windows
add the hack to project environment creation, instead of compliation
call sites, covers missing scenarions with maven scripting and K@ now
and should help to avoid problems in the future.
#KT-54461 fixed
2023-01-15 20:11:57 +01:00
Ilya Chernikov d8650d9b04 Scripting: support compiler plugins in hosted script compiler
Now the plugin-related compiler arguments are respected then used in
the compiler configuration (only in the static part, not supported
if set in a refinement callback)
Note that the "embeddable" version of the plugin should be used if
embeddable compiler is used.
#KT-54095 fixed
2023-01-15 11:14:41 +01:00
Svyatoslav Kuzmich 80e07d628b [Wasm] Use ModuleKind.ES
As the only JS-interop module kind Wasm supports
2023-01-13 21:58:32 +00:00
Artem Daugel-Dauge 0d1e7e83b5 [K/N, CLI] Pass through errors from Gradle to Xcode
^KT-55650

Merge-request: KT-MR-8245
Merged-by: Artem Daugel-Dauge <Artem.Daugel-Dauge@jetbrains.com>
2023-01-13 20:54:05 +00:00
Mikhail Glukhikh ecc81098a6 Unbind FIR mangler from use-site session (by Simon Ogorodnik) 2023-01-13 12:56:01 +00:00
Mikhail Glukhikh 890e3d1c10 FIR2IR/MPP: use single SymbolTable during MPP compilation 2023-01-13 12:56:00 +00:00
Ivan Kochurkin 5d273ce839 [FIR & FIR2IR] Prepare test and CLI infrastructure to support MPP
- Move out getAnalyzerServices from FirFrontendFacade to TestSetupUtils
- Simplify DependencyListForCliModule. Now it takes BinaryModuleData as input
- FirOutArtifact contains several FirOutputArtifactPart
- Simplify FirFrontendFacade
2023-01-13 12:55:57 +00:00
Ivan Kochurkin bcfdbaa6a6 [FIR] Use ModuleCompilerAnalyzedOutput instead of FirResult
Remove FirResult since it has the same semantics value
2023-01-13 12:55:55 +00:00
Igor Chevdar 9c86532eb0 [K/N] Implemented cache orchestration machinery in the compiler 2023-01-11 14:13:01 +00:00
Yahor Berdnikau 43eea47032 Mark compiler arguments that should generate deprecated kotlinOptions DSL
This will allow to keep backward compatiblity for deprecated
kotlinOptions DSL for already existing compiler arguments, but add a new
 one only into compilerOptions DSL.

^KT-53108 In Progress
2023-01-10 14:56:11 +00:00
Vladimir Sukharev 924898afb7 [K/N] KFC-446: K2 platform: Native alpha
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-04 16:10:40 +00:00
Marco Pennekamp a777ffcd8a [AA] KT-55566 StandaloneProjectFactory: Setup JDK default module roots
- Setup JDK default module roots in `StandaloneProjectFactory` (compare
  with `KotlinCoreEnvironment`). The implementation is a distilled
  version of `ClasspathRootsResolver`'s default module handling.
- This fixes an issue where some LL FIR tests with JDK 17 and 11 had
  mismatched types between Kotlin and Java sources.

^KT-55566 fixed
2023-01-04 11:46:11 +00:00
Vladimir Dolzhenko 4542b3947b Clean up: rename Jet* to Kt* 2023-01-03 16:36:53 +01:00
Ilya Chernikov 19a0a1fcd8 K2: add missing MPP warning in LightTree mode 2023-01-02 19:54:57 +00:00
Ilya Chernikov 47a4532ea0 K2: update LightTree support in modularized tests 2023-01-02 19:54:56 +00:00
Ilya Chernikov 1a373317ed K2: temporarily disable scripts compilation in LT mode
Should be addressed in the new K2 scripting support soon
2023-01-02 19:54:56 +00:00
Ilya Chernikov 23a27864e5 K2: introduce LT mode config property 2023-01-02 19:54:56 +00:00