Commit Graph

97486 Commits

Author SHA1 Message Date
Kirill Rakhman 1b016d0bce FIR, Serialization: fix FirSerializationPluginClassChecker after DiagnosticsReporter refactoring related to reporting diagnostic on null source 2023-01-11 08:30:36 +00:00
Kirill Rakhman 69f2e8826a FIR: fix a bunch of issues after DiagnosticsReporter refactoring related to reporting diagnostic on null source 2023-01-11 08:30:36 +00:00
Kirill Rakhman a7edf5b83e FIR: Throw if source is null in DiagnosticReporter.reportOn ^KT-55284 Fixed 2023-01-11 08:30:36 +00:00
Ilya Goncharov c3bdcc6b0d [Gradle, JS] Use JAR archive task type only for jar archiveType 2023-01-10 20:15:55 +00:00
aleksandrina-streltsova c6886fc779 [FIR] Use post-compute in typeAliasCache for deserialized symbols
^KTIJ-24156 Fixed
2023-01-10 20:15:28 +00:00
aleksandrina-streltsova 3a6e3290aa [FIR] KTIJ-24156: Add test data 2023-01-10 20:15:28 +00:00
aleksandrina-streltsova af414cfb5e [Analysis API] Provide API for getting KtTypeAliasSymbol by ClassId 2023-01-10 20:15:27 +00:00
Alexander.Likhachev ca68ca753a [Gradle] Temporary add max version for ScriptingIT due to a Gradle bug
#KT-52625 In Progress
2023-01-10 19:08:38 +00:00
Alexander Likhachev be3fe747c3 [Gradle] Suppress JS deprecation warning in test projects 2023-01-10 19:08:37 +00:00
Alexander Likhachev d7b446d20f [Gradle] Avoid accessing PropertiesProvider via rootProject
This way in the default setup, there are no reported problems with project isolation
#KT-55164 Fixed
#KT-52963 Fixed
#KT-52625 In Progress
2023-01-10 19:08:37 +00:00
Alexander Likhachev 61cac14ed7 [Gradle] Don't detect multiple plugin instances with project isolation enabled
#KT-55164 In Progress
#KT-52625 In Progress
2023-01-10 19:08:37 +00:00
Alexander Likhachev 08c8d3ec03 [Gradle] Bump maximum supported Gradle version to 7.4 in tests
#KT-52625 In Progress
2023-01-10 19:08:36 +00:00
Alexander Likhachev 51b011706b [Gradle] Check if configuration cache was stored in JS CoCa tests 2023-01-10 19:08:36 +00:00
Alexander Likhachev 89811f8d95 [Gradle] Remove unnecessary Gradle version requirements for CoCa tests 2023-01-10 19:08:36 +00:00
Alexander Likhachev 487439054e [Gradle] Remove default build options duplicates in ConfigurationCacheIT 2023-01-10 19:08:35 +00:00
Alexander Likhachev bfde8eda81 [Gradle] Do not check for configuration cache report file existence
This file is generated even if there's no problems since Gradle 7.4. It now contains useful information to determine configuration inputs. Rely on the configuration cache problems option instead.
#KT-52625 In Progress
2023-01-10 19:08:35 +00:00
Alexander Likhachev 72a6f977f6 [Gradle] Disable fail on warning for some tests because of KT-55751
#KT-52625 In Progress
2023-01-10 19:08:35 +00:00
Alexander Likhachev 503db425aa [Gradle] Disable fail on warning for some tests with an old AGP version
#KT-52625 In Progress
2023-01-10 19:08:34 +00:00
Alexander.Likhachev 202fe9e41e [Build] Fix configuration cache issue on running :js:js.tests:test
#KT-55839 Fixed
2023-01-10 19:08:09 +00:00
Nikolay Krasko 1451ef74c2 Additional note in instruction for reproducibility 1.8.0 2023-01-10 18:06:38 +01:00
Alexander Udalov 3dc3ed4ca5 Exclude jdk.internal.* in backend debug tests
Otherwise `debug/stepping/enum.kt` starts failing as soon as we advance
default language version to 1.9, because with the introduction of enum
entries, enum's `<clinit>` now invokes LambdaMetafactory which invokes
its own bundled version of ASM located in
`jdk.internal.org.objectweb.asm`, so we end up stepping over a lot of
internal ASM code.

`jdk.internal.*` is also excluded by default in the debugger settings in
IntelliJ, so users will not observe this issue in practice.
2023-01-10 16:39:05 +00:00
Pavel Kirpichenkov 38d55757b3 [Tests] Move MultiplatformExtensionTest to util
KT-55530
2023-01-10 16:02:55 +00:00
Pavel Kirpichenkov e40d64dfc0 [Tests] Move functional task tests to unit tests package
KT-55530
2023-01-10 16:02:55 +00:00
Pavel Kirpichenkov 4dbb2b01fe [Tests] Give clear name to functional dependency resolution tests
KT-55530
2023-01-10 16:02:54 +00:00
Pavel Kirpichenkov 11b026f268 [Tests] Remove deprecated JS compiler type from test
KT-55530
2023-01-10 16:02:54 +00:00
Pavel Kirpichenkov ba7ecc07be [Tests] Move external android target smoke test to the common package
KT-55530
2023-01-10 16:02:54 +00:00
Pavel Kirpichenkov f768b05804 [Tests] Rename functional test packages in KGP
KT-55530
2023-01-10 16:02:53 +00:00
Pavel Kirpichenkov c3ea93f4a4 [Tests] Split functional tests by Gradle tasks
KT-55530
2023-01-10 16:02:53 +00:00
Pavel Kirpichenkov f92558d1c3 Minor: code cleanup
KT-55530
2023-01-10 16:02:53 +00:00
Pavel Kirpichenkov cee5d568a5 [MPP, tests] Rearrange functional tests
Split tests into groups: unit tests, regression tests and
ide importing tests. Create additional run configurations for them.

KT-55530
2023-01-10 16:02:52 +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
Aleksei.Cherepanov 671aa68ad6 Add K2 tests for JPS with different configuration (K2, LightTree and Fir-IC)
*Enable JPS tests for K2
*Exclude compiler messages from the comparison of output logs, as they can vary depending on the compiler
*Mute failing tests:
  1) Sam conversions - Unmute after updating IntelliJ core up to 212, as they should pass after updating IntelliJ JPS dependency
  2) Failing IC tests with Java-interop, that are needed to be fixed during KT-55696
  3) Failing IC tests with recording different sets of lookups by the compiler, that are needed to be fixed during KT-55195
  4) Failing AllConstants, will be changed in KT-54991
*Fix test data:
  1) Add cleaned outputs for JPS, because Gradle skips error messages at all
  2) Rename gradle-fir-build.log to fir-build.log, because JPS also can use it and there is no need to duplicate files
  3) Add some k2-specific logs, that changed the set of files in different rounds in comparison with the old compiler, but the scope stays the same
  4) Remove useless logs and obsolete directives.txt files as they have no impact on test results
  5) Replace fir-build.log files with gradle-fir-build.log because Gradle build with FIR is correct, but not optimal. JPS with K2 is now tested with fir-build.log files
  6) Remove useless fir-log, as it duplicates the main build log, and Remove empty directives file

#KT-54991 In Progress

Merge-request: KT-MR-8174
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-01-10 14:31:55 +00:00
pyos 308e1362ab Minor: FIR DFA: fix code style 2023-01-10 15:40:53 +02:00
pyos 5d4b44500a FIR CFA: remove direction from ControlFlowGraph.traverse.
If you care about direction, then you also care about labels.

3 out of 6 places that use `traverse` are incorrect, by the way.
Node order does not correspond to scoping boundaries.
2023-01-10 15:40:53 +02:00
pyos de105e602d FIR CFA: remove redundant entries from followingCfgNodes
Edges to subgraphs should now be correctly added, so there's no need to
look at them separately.
2023-01-10 15:40:52 +02:00
pyos da018e9d06 FIR CFA: align reading of labels with the way they're generated
UncaughtExceptionPath label out of a finally block matches every label
that is not handled by another edge, and a labeled edge from the middle
of a finally block aborts the jump and so should merge all available
data.
2023-01-10 15:40:52 +02:00
pyos d655147c8c FIR CFA: remove a redundant wrapper around PersistentMap 2023-01-10 15:40:52 +02:00
pyos 065ed46495 FIR CFA: require path awareness in fixed point iteration
It really doesn't make sense to collect control flow data without
checking paths, since that'll produce incorrect results for try-catch.
2023-01-10 15:40:52 +02:00
pyos 63ab9119f8 FIR: do not use CFG in FirPropertyInitializationChecker 2023-01-10 15:40:52 +02:00
pyos e86b87fe0b Test: FIR CFA: fix the names of some nodes 2023-01-10 15:40:52 +02:00
pyos fbd0908f0c FIR DFA: add smartcast invalidation for init block assignments 2023-01-10 15:40:51 +02:00
pyos c185bf60f8 Add a test for data flow with reassignments in local classes 2023-01-10 15:40:51 +02:00
pyos 1aae586238 FIR DFA: don't erase statements when entering non-call-in-place lambda
Instead, rely on the variable assignment analyzer to properly restrict
smart casts. This makes error messages more consistent, but otherwise
should have no effect.
2023-01-10 15:40:51 +02:00
pyos 5a79017879 FIR CFA: remove some redundant node stacks
Honestly the amount of mutable state in the builder makes me somewhat
uneasy.
2023-01-10 15:40:51 +02:00
pyos 60662663be FIR CFA: remove the id parameter from nodes 2023-01-10 15:40:51 +02:00
pyos dca6caaafa FIR CFA: add a hack for enum classes and LL API
No clue what's going on there.
2023-01-10 15:40:51 +02:00
pyos 377b7bdf5e FIR CFA: remove top-level graph
It should never have contained any nodes because it was not attached
to anything.
2023-01-10 15:40:50 +02:00
pyos b548473544 FIR CFA: automatically compute node levels 2023-01-10 15:40:50 +02:00
pyos 0dd949bb36 FIR DFA: route data flow through anonymous objects
^KT-44515 Fixed
2023-01-10 15:40:50 +02:00
pyos 17ee8f3a7b FIR CFA: put primary constructor before other class members 2023-01-10 15:40:50 +02:00