Commit Graph

921 Commits

Author SHA1 Message Date
Artem Kobzar 77f0cba23f [K/JS] Introduce v2015 target 2024-03-06 12:21:38 +00:00
Alexander Udalov 939a74add3 CLI: improve error message for -Xjdk-release=1.6/1.7
#KT-66174 Fixed
2024-02-29 11:05:20 +00:00
Alexander Udalov 5f261d3ad0 CLI: fix "unknown JVM target version" error message
Do not list 1.6 as supported because it was removed in KT-45165.

 #KT-66175 Fixed
2024-02-29 11:05:20 +00:00
Alexander Udalov f98a22e8e4 Fir2Ir: enable IR-based fake override builder
Invert the logic of IR/FIR2IR-based generators: change the CLI argument
to -Xuse-fir-fake-override-builder, test directive to
USE_FIR_BASED_FAKE_OVERRIDE_GENERATOR, etc.

The changes in test data caused by using IR fake override builder by
default are in the subsequent commit.

 #KT-61514
2024-02-29 10:14:31 +00:00
Nikita Nazarov 407448d8e3 [JVM] Implement new inlined variable naming format
^KT-65478 fixed
2024-02-23 23:59:13 +01:00
Kirill Rakhman f231338cd6 [FIR] Render list of symbols with linebreaks as separators
#KT-61823 Fixed
2024-02-21 12:25:22 +00:00
Ilya Chernikov 10dbe73828 K2 Scripting: report error on attempt to use scripts in common roots
#KT-65967 fixed
2024-02-21 07:47:15 +00:00
Alexander Udalov 90ff8f0e64 JVM: support -Xjdk-release=7/1.7
#KT-59098 Fixed
2024-02-19 11:44:58 +00:00
Alexander Udalov 12f393791b JVM: allow -jvm-target 1.8 with -Xjdk-release=1.6
#KT-59098
2024-02-19 11:44:58 +00:00
Alexander Udalov 1bc08fc5b8 JVM: report error on -Xjdk-release=6 without -jvm-target
#KT-59098
2024-02-19 11:44:58 +00:00
Ilya Goncharov d02be30e3b [Gradle, JS] Return back deprecated options noStdlib and metaInfo 2024-02-09 18:20:08 +00:00
Ilya Goncharov 2340d59f40 [JS] Get rid of outputFile in compiler args (KT-61116)
^KT-56753 fixed
2024-02-09 18:20:08 +00:00
Pavel Mikhailovskii 7ab9e03347 KT-65684: KAPT: (Re)enable fallback to K1 KAPT and make it default
[KAPT] KT-65684 Set languageVersion=1.9 in KaptToolIntegrationTestGenerated

[KAPT] KT-65684 Re-enable a few now-passing tests in Kapt4IT

[KAPT] KT-65684 Fix the logic setting -Xuse-kapt4 flag in Kapt4IT.forceKapt4()

The change is needed to make sure that all the tests have the flag set,
 otherwise some of them would silently switch to the fallback node.
Also disables a few now failing tests.

[KAPT] KT-65684 Revert "KT-64385 Enable K2 KAPT by default"

This reverts commit 7e9d6e60


Merge-request: KT-MR-14291
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-02-09 12:54:28 +00:00
Roman Efremov 1f30d076de [CLI] Introduce compiler argument to suppress error about API version
...greater than language version.

^KT-63712
2024-02-09 11:02:26 +00:00
Evgeniy.Zhelenskiy 7eab4b672d [K1, K2, CLI] Mark whole position range of compiler diagnostics in CLI
#KT-64989
2024-02-08 12:59:31 +00:00
Alexander Udalov 77dba281a3 CLI: remove obsolete -Xbuiltins-from-sources
Looks like it has no effect anymore after 3f2e996803.
2024-02-01 23:37:23 +00:00
Alexander Udalov 2d308e7c27 CLI: remove obsolete language feature arguments
These arguments switch language features which cannot be disabled
anymore because they're enabled from some LV not later than 1.4, and the
minimal supported LV is currently 1.4.
2024-02-01 23:37:23 +00:00
Alexander Udalov c2e67619ba CLI: remove obsolete -Xdisable-ultra-light-classes 2024-02-01 23:37:23 +00:00
Alexander Udalov 9d5e1bdc47 CLI: remove obsolete -Xallow-result-return-type 2024-02-01 23:37:23 +00:00
Alexander Udalov 49c659b379 CLI: remove obsolete -Xdump-declarations-to
It was only used in the very old version of binary compatibility
validator. It was never supported in the JVM IR backend.
2024-02-01 23:37:23 +00:00
Kirill Rakhman 1626057f75 [FIR] Improve rendering of override related diagnostics
Render symbols completely and add containing declaration.
2024-01-31 11:16:50 +00:00
Mikhail Glukhikh ed246d372b K2: introduce platform-dependent filtering for non-JVM platforms
This commit fixes a false negative in testData/cli/metadata/getOrDefault
Related to KT-57268
2024-01-30 19:44:00 +00:00
Mikhail Glukhikh 7599ff0ef1 K2: add a reproducer for getOrDefault false negative in metadata compilation
This case is similar to KT-57268 in early JDKs
2024-01-30 19:44:00 +00:00
Nikita Bobko c214c5445a [FIR] Implement EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE
^KT-60367 Fixed
KT review: https://jetbrains.team/p/kt/reviews/14064/timeline
IJ review: https://jetbrains.team/p/ij/reviews/124657/timeline
2024-01-29 14:56:48 +00:00
Dmitriy Novozhilov b71797383f [Test] Add CLI tests for platform checkers in MPP
^KT-58881
2024-01-24 10:45:00 +02:00
Sergej Jaskiewicz e8aa05928d [FIR2IR] Unconditionally disable linkViaSignatures on JVM
It was an experimental compilation mode that we don't need anymore.

KT-64809
2024-01-19 13:35:59 +00:00
Kirill Rakhman b7b1bd0a2c [FIR] Fix parameter order of NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS
(cherry picked from commit 8bfc4675c4)
2024-01-18 08:27:10 +00:00
Kirill Rakhman cf0824f3ef Revert "[FIR] Fix parameter order of NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS"
This reverts commit 8bfc4675c4.
2024-01-16 09:14:20 +01:00
Kirill Rakhman 8bfc4675c4 [FIR] Fix parameter order of NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS 2024-01-15 12:23:26 +00:00
strangepleasures 7e9d6e601d KT-64385 Enable K2 KAPT by default
Also adds support for front-end compiler plugins in Kapt
2024-01-15 10:22:32 +00:00
Denis.Zharkov b9019d3de1 K2: Adjust test data after PCLA implementation [red-to-green]
^KT-59791 In Progress
2024-01-10 14:56:30 +00:00
Dmitrii Gridin 37ccf5d4f3 [resolution] KotlinJavaPsiFacade: do not return classes with wrong ClassId
We shouldn't return from `findClass`/`findClasses` Java classes with
`ClassId` different from the requested one

^KT-62892
2024-01-04 15:20:38 +00:00
Kirill Rakhman 8f3f72d9c9 [FIR] Use correct type renderer in symbol rendering for diagnostics
#KT-62815 Fixed
2024-01-02 15:17:02 +00:00
Kirill Rakhman 6b049df87c [FIR] Render deprecation message if it's not a named argument. 2024-01-02 15:17:02 +00:00
Kirill Rakhman 14bdcbfecd [FIR] Improve NO_ELSE_IN_WHEN message 2024-01-02 15:17:02 +00:00
Artem Kobzar 2530cba82a [K/JS] Compile Kotlin coroutines as JS generator ^KT-63038 Fixed 2023-12-18 17:13:07 +00:00
Dmitriy Dolovov 1c285de55e [KLIB Resolver] Prettier KLIB resolver messages
- Make the messages that are reported by KLIB resolver prettier
- For those messages that affect the resolve process add
  prefix "KLIB resolver: "
- Don't log warning on duplicated libraries on the classpath. This
  does not make any sense.

^KT-63573
2023-12-18 13:03:40 +00:00
Ilya Goncharov 08e3cb300a [JS] Migrate tests onto IR compiler with outputDir API instead of outputFile
^KT-61117 fixed
2023-11-29 11:21:56 +00:00
Ilya Goncharov 093f51c89a [JS] Removing usage of legacy JS compiler #1 2023-11-28 13:44:37 +00:00
Artem Kobzar 1832f5a3f7 [K/JS] Introduce the ability to consume platform-specific cli arguments inside the main function ^KT-16981 Fixed 2023-11-18 11:01:34 +00:00
Kirill Rakhman 4964ee12a9 [CLI] Update CLI argument descriptions after review 2023-11-17 14:36:28 +00:00
Mikhail Glukhikh 0aa5170ba2 K2: delay jspecify strict mode introduction to version 2.1
Related to KT-62352, KT-55586
2023-11-17 08:21:04 +00:00
Kirill Rakhman 2df1e9dde6 [FIR] Implement warnings for java nullability type mismatch on override
#KT-56989
2023-11-15 08:43:55 +00:00
Kirill Rakhman a6fdeeb7df [FIR] Implement warnings for java nullability type mismatch
#KT-56989
2023-11-15 08:43:55 +00:00
Kirill Rakhman 2613a337ae [FIR] Improve symbol rendering in *_NOT_IMPLEMENTED diagnostics 2023-10-27 13:27:35 +00:00
Nikolay Lunyak fedadfb8db [FIR] Show ARGUMENTS_MAPPING_ERROR diagnostics along with INAPPLICABLE
K1 reports `ARGUMENT_TYPE_MISMATCH`
and `TOO_MANY_ARGUMENTS` together, and
one way to do it in K2 is to say that
their kinds of inapplicability difference
is not relevant to the user.

Note that K1 doesn't do such filtering,
so this change "makes K2 closer to K1",
but still different.

^KT-62541 Fixed

fixup! [FIR] Show ARGUMENTS_MAPPING_ERROR diagnostics along with INAPPLICABLE
2023-10-19 09:27:45 +00:00
Mikhail Glukhikh 0fb4c9b4fe FIR2IR: generate specific sources for property accessors
Related to KT-60111
2023-10-13 15:42:58 +00:00
Nikolay Lunyak 41c3f98419 [FIR] Make resolution of classes in FirProvider more reasonable.
See the `privateInFile.fir.kt` test.
Type mismatches are simply confusing.

`inheritorOfExpectSealedClass.out`
reports unresolved reference probably
because now it resolves into the expect
declaration, rather than the actual one.
K1 doesn't report UNRESOLVED_REFERENCE
in this case. But this is red code
anyway. And this behavior still
depends on the order in which the compiler
receives both the declarations.

^KT-59927
^KT-62567
2023-10-13 11:56:54 +00:00
Brian Norman 365ce2a6a5 [FIR] Implement checker for missing dependency supertypes
#KT-60778 Fixed
2023-10-04 21:57:43 +00:00
Stanislav Erokhin 0cfa721585 [KMP] Remove experimental from -Xmulti-platform flag
#KT-61686
2023-10-04 18:19:35 +00:00