Commit Graph

3230 Commits

Author SHA1 Message Date
Bogdan Mukvich 7b00323b89 [Build] Update guava
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Mikhail Glukhikh a73442f90f K2: add a check for duplicate source root 2023-08-25 08:57:53 +00:00
Mikhail Glukhikh 9bff7e3045 K2: introduce "no source files" CLI check 2023-08-25 08:57:52 +00:00
Kirill Rakhman 969c716c76 [FIR] Implement flag for disabling warning on error suppression
#KT-61129
2023-08-18 13:29:20 +00:00
Dmitriy Dolovov 033bb385b9 [IR] Drop expectDescriptorToSymbol completely
^KT-61136
2023-08-16 19:17:17 +00:00
Alexander Udalov bddc18e463 K2: do not run compilation if Java module graph setup failed
#KT-61156 Fixed
2023-08-14 16:32:15 +00:00
Anton Bannykh 962bfaca9c [JS] Support multimodule IC tests with K2
Includes supporting klib file generation.
2023-08-11 15:46:51 +00:00
Ivan Kochurkin 9ec7218af6 [FIR] Add isCommon property to FirModuleData
It will be used for correct OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE reporting
2023-08-10 17:46:08 +00:00
Igor Yakovlev 60d35200f6 [Wasm] Wasi frontend diagnostics 2023-08-08 18:10:19 +02:00
Kirill Rakhman 8ae751926c [FIR] Let OptIn LV checker only run on last module in HMPP compilation
This fixes an issue where the opt-in annotation is defined in one of the
source sets of the compilation but opt-ins are defined for the whole
compilation which leads to false-positive "Opt-in requirement marker is
unresolved" in (e.g. common) source sets that don't have a dependency on
the module that contains the annotation.

#KT-60755 Fixed
2023-08-08 07:57:56 +00:00
Svyatoslav Kuzmich 47ade4530c [Wasm] Add compiler flag to disable exception handling proposal
Fail with unreachable instead of throwing an exception

Merge-request: KT-MR-11481
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-08-07 16:19:29 +00:00
Pavel Mikhailovskii 84bf411cc3 Changes in the compiler needed to run KAPT 4 (KT-51982) 2023-07-31 18:07:40 +00:00
Alexander Udalov b81c637fed Minor, simplify FirDiagnosticsCompilerResultsReporter.reportByFile 2023-07-29 01:14:29 +02:00
Yan Zhulanow 7d88ade005 [fir2ir] Allow non-cached type parameters
In the IDE, there might come declarations from other files/modules
that we link against, but not compile. Type parameters are one of such
declaration kinds.
2023-07-28 16:05:34 +00:00
Ivan Kylchik 84159596bd [FIR] Pass diagnosticReporter in Fir2IrConfiguration
This parameter will be used to report diagnostics from constant
evaluator, in addition to report diagnostic from actualizer.
2023-07-27 22:50:21 +00:00
Ivan Kylchik 34f8228441 [Test] Reuse runResolution and runCheckers from analyze.kt 2023-07-27 22:50:20 +00:00
Svyatoslav Kuzmich 75142230b6 [Wasm] Support Wasm K2 frontend in CLI (KT-57230) 2023-07-27 10:05:22 +00:00
Mikhail Glukhikh 336ea28735 Drop setting progressive mode in cli / cli-base (related to KT-59171)
This commit prevents language version increase due to bootstrapping
problems. Compiler version X attempts to build the project with the
current version X+1 -> warning about progressive mode cannot be enabled ->
error due to -Werror -> build failure.
2023-07-26 18:19:58 +00:00
Ilya Chernikov 266a223460 Update scripting plugin autoload logic for K2 2023-07-26 08:49:26 +00:00
Mikhail Glukhikh 8c305d6143 K2: introduce infrastructure for LanguageVersionSettings checkers 2023-07-24 12:50:38 +00:00
Pavel Kunyavskiy d797505f06 [K/N] Drop merging forward and real declaration in deserializer
^KT-59643
2023-07-24 08:24:20 +00:00
Dmitrii Gridin 88da053408 [AA] forbid analyze from write action
Analysis is not supposed to be called from write action.
Such actions can lead to IDE freezes and incorrect behavior

^KT-60586 Fixed
2023-07-21 13:03:04 +00:00
Alexander Korepanov 08d158f901 [JS FIR] Support JS module system FE diagnostics
Support CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM diagnostic
^KT-59377 Fixed

Support CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM diagnostic
^KT-59381 Fixed

Support CALL_FROM_UMD_MUST_BE_JS_MODULE_AND_JS_NON_MODULE diagnostic
^KT-59417 Fixed
2023-07-18 14:02:30 +00:00
Mikhail Glukhikh 00b4ae6ae9 K2: expand type before isSomeType checks properly
Related to KT-60229
2023-07-14 16:38:47 +00:00
Dmitrii Krasnov f2816a5531 Added property for overriding konan distribution location
#KT-50463 Fixed

Merge-request: KT-MR-10310
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-07-12 12:36:51 +00:00
Sergei Kharitontcev-Beglov 34c6afec5e [Wasm] A name cache to distinguish same named declarations in DCE dump 2023-07-07 17:42:00 +00:00
Igor Yakovlev 750653e4b3 [Wasm] Add kotlin wasm wasi mode compiler flag 2023-07-07 15:23:18 +00:00
Pavel Mikhailovskii 083f54aceb [KAPT4] Create basic infrastructure for KAPT4 2023-07-07 11:09:16 +00:00
Dmitriy Novozhilov 037572ee9f [FIR] Create FirExtensionSyntheticFunctionInterfaceProvider only once for all sessions
This is needed to avoid duplication of symbols for the same classIds

^KT-58539 Fixed
2023-07-06 11:00:38 +00:00
Sergei Kharitontcev-Beglov 55bfd3efcb KT-52178: Argument propagation into IR backend & lowering dump action 2023-07-06 10:55:26 +00:00
Ilya Chernikov 5824b9c59c K2 Scripting: add Fir script codegen tests
27 failing tests are muted
2023-07-05 19:46:03 +00:00
Alexander Udalov 0625c1ea76 Minor, workaround an incremental compilation issue
After the previous commit, IC does not recompile code related to CLI
arguments parsing (likely due to KT-57919), so the resulting dist
compiler doesn't work at all, and all related tests are failing. This
"useless" override tricks the IC to recompile the class and all its
subclasses.
2023-06-27 08:34:40 +00:00
Troels Bjerre Lund 111bb461a9 CLI: Change kotlin reflection to java reflection
The command line argument parser is using between 0.25s and 0.5s
(depending on platform) on finding annotated properties. This fix
replaces the slow kotlin reflection with java reflection, which is an
order of magnitude faster.

 #KT-58183 Fixed
2023-06-27 08:34:40 +00:00
Artem Kobzar 64158a8a2f [K/JS] Add file-to-file compilation ^KT-6168 Fixed 2023-06-22 18:23:45 +00:00
Alexander Udalov bb4d25dfc9 IR: do not copy calls/references in ExpectSymbolTransformer
This is just a refactoring/optimization that makes use of the fact that
IrCall.symbol and other similar fields are now mutable.
2023-06-22 17:18:59 +00:00
Alexander Udalov e4d1e6246e CLI: increase default value of Xms option
According to the preloader's "-measure" option, just the raw class files
occupy ~50 Mb during compilation of hello world (~55 Mb for K2). So 32M
is a very outdated value for Xms. This change sets it to something more
reasonable to hopefully avoid unnecessary GCs and thus help with
performance and potentially with OOMs (KT-58690).

 #KT-58690
2023-06-22 17:10:11 +00:00
Alexander Udalov 530f533c84 K2 CLI: minor, remove misleading warning
Light tree is used by default now, so it's no longer far from being
production-ready.
2023-06-21 14:16:43 +00:00
Alexander Udalov 8653992ffc K2 CLI: wrap module name into angle brackets
This is not a user-visible change, so no issue is created and no tests
are added.

K1 uses angle brackets, and it will be very convenient to have the same
module names in K1 and K2, in particular to compare IR dumps where
almost everything is the same (up to a certain point) except the module
name.
2023-06-21 14:16:42 +00:00
Dmitriy Novozhilov 5717b59f52 [FIR/IR] Introduce an ability to propagate generated IR annotation to metadata
^KT-58638 Fixed
2023-06-21 06:56:59 +00:00
Ilya Chernikov 4fe3e875fa Write refined classpath back to compiler config in core env
- fixes refining with classpath updates
2023-06-20 16:38:33 +00:00
Ilya Chernikov 6f8049ffd3 CLI: support -language-version option in cli runner 2023-06-20 16:38:32 +00:00
Ivan Kylchik 0021a5f655 [K2] Save inlined java field into special InlineConstTracker 2023-06-14 19:02:39 +00:00
Dmitriy Novozhilov ba41e8ec38 [IR] Use common expect/actual matching algorithm in IR actualizer
^KT-58578 Fixed
2023-06-10 07:33:29 +00:00
Pavel Mikhailovskii fc7af2c9e0 KT-58720 Generate full InnerClass attributes for the standard library; deprecate -Xuse-old-innerclasses-logic 2023-06-09 11:31:17 +00:00
Nikolay Lunyak 23f87eda1f [FIR] KT-57803: Report the error message for light tree
The renaming prevents the JVM clash.

^KT-57803 Fixed
2023-06-06 07:43:37 +00:00
Nikolay Lunyak 70605c84df [FIR Native] KT-58549: Get rid of the builtin provider
According to
`FirNativeCodegenBoxTestGenerated.testNestedClassesInAnnotations`,
the annotation
`kotlin.internal.PlatformDependent` is
unresolved reference.

^KT-58549 Fixed
2023-06-01 10:27:54 +00:00
Ivan Kochurkin abdb173f6c Add AnalysisFlags.metadataCompilation flag
It's `true` if metadata compilation mode is activated

It's being initialized in K2MetadataCompilerArguments
2023-05-31 14:38:38 +00:00
Ilya Kirillov c114cb67cb [Java resolution] make it possible to provide custom source element for JavaElement
This is needed to allow using PSI pointers in IDE in JavaElement.
`JavaElement`s are reused between read actions,
so underlying PSI elements might be invalidated when using hard PSI references

^KT-58194
2023-05-31 13:01:19 +00:00
Alexander Shabalin aea8bac7d2 [K/N] Do not compile for deprecated targets and legacy MM
^KT-56533
^KT-58853
2023-05-30 16:44:58 +00:00
Alexander Udalov 60016d3e5b Remove obsolete compiler flag -Xuse-ir 2023-05-30 14:46:09 +00:00