Commit Graph

1859 Commits

Author SHA1 Message Date
Alexey.Merkulov
c8080e5f06 [debugger] Fix statistics about evaluator compilation failures
Fixed evaluation.result event. Note, the statistics were correct for the analysis.compilation.result

IDEA-366380

(cherry picked from commit 90b8f35bc6b9e8c08ef06b965088c509fc17d3c0)


Merge-request: IJ-MR-153908
Merged-by: Alexey Merkulov <alexey.merkulov@jetbrains.com>

GitOrigin-RevId: 47c80ce393305490a467cba3cd743f8b6c343218
2025-01-29 19:12:07 +00:00
Vladimir Lagunov
1d8ca26477 Update copyrights in Kotlin Tests to let Test Aggregator pass
Otherwise, `org.jetbrains.kotlin.idea.testGenerator.all.AllTestsGeneratedTest.testAllTestsIsUpToDate` fails with an error like:

```
com.intellij.platform.testFramework.core.FileComparisonFailedError: 'GradleBuildFileHighlightingTestGenerated.java' is not up to date
Use 'Generate Kotlin Tests' run configuration to regenerate tests
  at org.jetbrains.kotlin.testGenerator.generator.TestGeneratorKt.write(TestGenerator.kt:156)
  at org.jetbrains.kotlin.testGenerator.generator.TestGenerator.write(TestGenerator.kt:72)
  at org.jetbrains.kotlin.testGenerator.generator.TestGenerator.write(TestGenerator.kt:32)
  at org.jetbrains.kotlin.fe10.testGenerator.Fe10GenerateTestsKt.generateK1Tests(Fe10GenerateTests.kt:172)
  at org.jetbrains.kotlin.idea.testGenerator.all.AllTestsGeneratedTest.testAllTestsIsUpToDate(AllTestsGeneratedTest.kt:10)
  at java.base/java.lang.reflect.Method.invoke(Method.java:580)
  at junit.framework.TestCase.runTest(TestCase.java:177)
  at junit.framework.TestCase.runBare(TestCase.java:142)
  at junit.framework.TestResult$1.protect(TestResult.java:122)
  at junit.framework.TestResult.runProtected(TestResult.java:142)
  at junit.framework.TestResult.run(TestResult.java:125)
  at junit.framework.TestCase.run(TestCase.java:130)
  at junit.framework.TestSuite.runTest(TestSuite.java:241)
  at junit.framework.TestSuite.run(TestSuite.java:236)
  at com.intellij.TestAll.runOrCollectNextTest(TestAll.java:399)
  at com.intellij.TestAll.run(TestAll.java:280)
  at junit.framework.TestSuite.runTest(TestSuite.java:241)
  at junit.framework.TestSuite.run(TestSuite.java:236)
```

GitOrigin-RevId: c8a0adce00acd8196ac923bf62425f682be70931
2025-01-02 17:06:48 +00:00
Alexey.Merkulov
97b2653a4b IDEA-365198 Improve detecting of miscompiled evaluation problems
(cherry picked from commit 2a68d81ea4e95086a3c37724d28c6c981d194797)

IJ-CR-152216

GitOrigin-RevId: d44c9e6560909e033906d56ad5112a19b3d67f95
2025-01-02 15:44:49 +00:00
Alexey.Merkulov
8b28e1dba3 IDEA-364943 Report LinkageError exceptions as MISCOMPILED problems
(cherry picked from commit 673c46d7a6f41a52c085a5df37decd1ae030d1a1)

IJ-CR-151999

GitOrigin-RevId: 9dd247c866114827814acf2d28f637fbbccc8f73
2024-12-20 14:25:04 +00:00
Alexey.Merkulov
a635619cd2 [debugger] Fix a couple of cases with invalid statistics reporting
IDEA-362361

(cherry picked from commit 7bdf1ca436e487c70eff2badde6f9531e3960e4b)


IJ-CR-151042

GitOrigin-RevId: 098cf93fb08e99d71ab75ad7e19cfd336533d6b9
2024-12-09 18:30:49 +00:00
Alexey.Merkulov
f40e3cec5f [debugger] Improve Kotlin evaluator runtime problems reporting
(cherry picked from commit d70d0a58620eabe9fe36233c908d46abc04a2213)


IJ-CR-151042

GitOrigin-RevId: 30390daa0fe9e41293d1fa13bda026cfedfd5598
2024-12-09 18:30:49 +00:00
Alexey.Merkulov
9afb971dd9 [debugger] Improve statistics about Kotlin code fragment evaluation
IDEA-362361

(cherry picked from commit be355d22d5edae92a009c687dc7c083eb0dff335)


IJ-CR-151042

GitOrigin-RevId: 089dd4e20439c541ee8da7f9105d55399c77d1fa
2024-12-09 18:30:49 +00:00
Alexey.Merkulov
a9a6b63c37 [debugger] Cache compilation errors
IDEA-362361

(cherry picked from commit 8889c2e7296bf0b6a4e915c78aee7be5b7b80f69)


IJ-CR-151042

GitOrigin-RevId: 66e1d2f7f71662724bc990753858f108788665ee
2024-12-09 18:30:49 +00:00
Alexey.Merkulov
66796e15d8 [debugger] Improve statistics about Kotlin code fragment compilation
IDEA-362361

(cherry picked from commit b91dbbf519d67861ef91558eb8a6265583697ab0)


IJ-CR-151042

GitOrigin-RevId: cd5a091a3223609027a0343fe4506e03eb0ecfca
2024-12-09 18:30:49 +00:00
Alexey Belkov
46820cf154 [kotlin] J2K: AfterConversionPass cleanup
KTIJ-28714

(cherry picked from commit a1e5a2b6df1f06d75a26e42bf639344c4e40b9cb)

GitOrigin-RevId: cbbdd60b535d2303b69414260fe242ab48a7d4a3
2024-12-05 21:53:55 +00:00
Alexey Merkulov
720ce629f0 [debugger] IDEA-361080 Add workaround to fix ObjectCollectedException during evaluating conditional breakpoints
(cherry picked from commit 9922fc513d0c4e4d7daa4cc89d078fbb6b5a8f72)

IJ-CR-147314

GitOrigin-RevId: ffc72ca98c6b98842cde50e1a9e76f88c89f9228
2024-11-21 16:24:36 +00:00
Maria Sokolova
4ef1ffa5b7 [coroutine-debugger] Fix smart step into async coroutine builders (launch, async).
The original commit: 1776b92a

Instead of stepping from create to invokeSuspend method of the copied lambda, set a breakpoint into invokeSuspend and resume:
1. First set a breakpoint into `create` method of a given lambda.
2. Get the copied lambda instance.
3. Set a breakpoint into invokeSuspend of the new instance and resume.

IDEA-348340


Merge-request: IJ-MR-147058
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>

(cherry picked from commit b190050f086880b02de10a29b5fb61175162348b)

IJ-CR-147164

GitOrigin-RevId: 151051226642470f8e1401d1d82a7a0ca2cd146d
2024-10-22 14:03:20 +00:00
Maria Sokolova
3bba6596d0 [coroutine-debugger] Smart step into coroutine builders and suspend lambdas
* Step into invokeSuspend for suspend lambdas + check coroutine filter
* Step into create for async coroutine builders, check lambda id and step to invokeSuspend


Merge-request: IJ-MR-141083
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>

(cherry picked from commit 1776b92aa566cf51d8f6e79d338c86fc37b2255e)

IJ-CR-147164

GitOrigin-RevId: c16625bfa2ed13e321f7c849357f40ec89dacaba
2024-10-22 14:03:20 +00:00
Alexey Merkulov
9f7ada624a [debugger] Fix Kotlin K2 code fragment compilation statistics
Before we count as problems the incorrect code fragments which come a lot from watches


IJ-MR-146596

GitOrigin-RevId: 5302ff7c05b47b7430e8f4d05c974cc690ffe9e1
2024-10-12 01:59:32 +00:00
Yan Zhulanow
792d326322 Merge commit '6c179ad79bb7e81fd342c1d602050a2ccd43afa6'
GitOrigin-RevId: 397e0c282377c751d1ce742acb99e4dfb28c890b
2024-10-11 19:03:30 +09:00
Maksim Zuev
55c932f04f [debugger, kotlin] IDEA-346083 Fix smart-step-into methods with context receivers
GitOrigin-RevId: c7c1ee9ad93b21be2508669aeb4ca33791d40b44
2024-10-10 00:41:04 +00:00
Alexander Udalov
1af26c1630 [kotlin] Remove dependencies of debugger modules on -fe10 artifact
#KT-70139 Fixed

GitOrigin-RevId: 42cd88fd4b4e9df6f9eacc3a336ba25c4d3b516a
2024-10-09 21:58:10 +02:00
Alexander Udalov
940f1d5a42 [kotlin] Remove ClassBuilderFactory usage from KaCompilerTarget.JVM
#KT-70139

GitOrigin-RevId: 5aea4b4cfae06009bbe152af3b33340f29929797
2024-10-09 21:58:08 +02:00
Alexander Udalov
d2a33134cd [kotlin] Minor, remove usage of topLevelClassAsmType
#KT-70139

GitOrigin-RevId: 80d0c5d7b5d37b5ce80278447c2a4c55f9c47e1c
2024-10-09 21:58:07 +02:00
Alexander Udalov
aaae7b9e70 [kotlin] Adapt to moves in JVM backend internals
#KT-70139

GitOrigin-RevId: 105beb0acdce5089b6fcaf9c721f07e0432a54b8
2024-10-09 21:58:06 +02:00
Victoria.Petrakovich
51d2096d90 Merge commit '4faae27bfc6c5e8aec5c10c7e7bb3a09825ad351'
GitOrigin-RevId: 774773199c9d093f41d9af1b589768473be99a06
2024-10-08 13:52:22 +02:00
Egor Ushakov
5ebc40b83b [debugger] use optimized allLineLocationsSync to reduce number of sync debugger commands - fixed kotlin tests
GitOrigin-RevId: 84cb38dc804d598707691974e71069f65078644d
2024-10-04 10:48:22 +00:00
Egor Ushakov
0a33108740 [debugger] avoid scanning all classes in vm for nested sub classes - fixed kotlin tests
GitOrigin-RevId: e5fee6bd9579af0282e24bbba80a1054f7a083b9
2024-10-04 10:48:22 +00:00
Egor Ushakov
87b49d65b2 [debugger] use optimized allLineLocationsSync to reduce number of sync debugger commands
GitOrigin-RevId: 9d0735eb837b705456872ff5f11cbd3c4587f012
2024-10-04 10:48:22 +00:00
Egor Ushakov
6496b8de8d [coroutines debugger] do not refresh breakpoints on every step over
GitOrigin-RevId: d31189fd36b5247bb3750f2dbf8acdbb7934a0b9
2024-10-02 18:22:09 +00:00
Maksim Zuev
e046e5c6a5 [debugger] CodeFragmentFactory can produce PsiCodeFragment
* broaden code fragment type to be able to implement non-java evaluators


Merge-request: IJ-MR-145790
Merged-by: Maksim Zuev <Maksim.Zuev@jetbrains.com>

GitOrigin-RevId: 096badbd7e76b2c8065867349e0839452b683ab4
2024-10-02 17:36:00 +00:00
Maksim Zuev
08b5c4605c [debugger kotlin] IDEA-360018 Fix smart step into local functions with vararg params
GitOrigin-RevId: 35af252e0e4ab88a2fd03531beaa8baa35137baf
2024-10-02 17:23:13 +00:00
Maksim Zuev
8390394fec [debugger] IDEA-358819 Wrap Analysis API calls in dumb mode
* fallback to default values when in dumb mode
* avoid IndexNotReadyException exceptions

GitOrigin-RevId: 4e758719c59fb1ecfc72ef88bb683fb20503181e
2024-10-02 17:13:02 +00:00
Maksim Zuev
198b649377 [debugger] EA-1494285 Wrap read action
GitOrigin-RevId: 254f45f9cbd7011c56345fff851d63ec00b4faf1
2024-10-02 16:46:24 +00:00
Tagir Valeev
757b37a777 [kotlin-dfa] Debugger assist: boxed boolean support
Fixes IDEA-360006 Kotlin Debugger: no DFA if-hint for nullable boolean

GitOrigin-RevId: 4b1476cb9a7fc2d8c2315942dc6cbf7a67f012a4
2024-10-01 15:52:21 +00:00
Alexey Merkulov
0729b2a230 [debugger] IDEA-358626 Show indicator with possibility to cancel the stepping request
IJ-MR-145237

GitOrigin-RevId: 4283b9faf567bdbcaf25a44319928e102e3a7b10
2024-10-01 15:14:39 +00:00
Alexey Merkulov
151b03f97d [debugger] Refactoring: extract SteppingAction from DebuggerStatistics to use it for stepping-kind tracking
IJ-MR-145237

GitOrigin-RevId: e878bbe490b961a81120b7cba8b9383c53305efb
2024-10-01 15:14:39 +00:00
Tagir Valeev
394ba7023a [kotlin-dfa] KTIJ-30856 Constant conditions: track implicit 'this' in extension methods properly
GitOrigin-RevId: 6c93d799b48b736757c5c1386b36f845fe63289d
2024-10-01 08:57:46 +00:00
Maksim Zuev
2fc7868ad6 [debugger, kotlin] Smart step into: provide sync method for tests
* do not block DMT
* fix flaky tests

GitOrigin-RevId: d9f319d158d1f79f8fb1e664b43d72e7cf8403ab
2024-09-30 13:02:50 +00:00
Abduqodiri Qurbonzoda
f9f47fac77 [kotlin] Replace a usage of deprecated String.toLowerCase() #KT-71628
GitOrigin-RevId: d3bc1b0706d0c7ce5ee83920f0a1fd6fd088b813
2024-09-29 22:22:09 +02:00
Vladimir Dolzhenko
3f86df8792 Merge branch 'kt-master'
GitOrigin-RevId: 70255674850983ff30928a74d5a2d1faef5d9973
2024-09-29 09:18:59 +02:00
Maksim Zuev
c6380e6910 [debugger, kotlin] Smart step into: rewrite with debugger suspend command
GitOrigin-RevId: ba8e3f7a57e081c7c57d569aad3b887cbe7de67c
2024-09-26 18:31:31 +00:00
Vladimir Parfinenko
4c63e241d2 [debugger] intention to control exception breakpoints in editor, IJPL-161898
GitOrigin-RevId: 74a8cd67b65e433aae9012672dd9f8e92f2fb839
2024-09-26 13:42:39 +00:00
Egor Ushakov
4f02ed5309 EA-1237716 - T: CoroutineSelectedNodeListener$install$1.onDoubleClick
GitOrigin-RevId: 2f8216638f0ae96636aaf41b37882bfe3220ec57
2024-09-25 18:17:11 +00:00
Alexander Udalov
9cbd851ab4 [kotlin] Remove old JVM backend extensions
#KT-71197

GitOrigin-RevId: 04ed6c319927657d919a1574968d2691be22e7b4
2024-09-25 00:31:09 +02:00
Anastasia Pikalova
b47b9c2ae1 [kotlin] Error/warning message for @SubclassOptInRequired-annotated class should provide more context
^KT-70407 Fixed

GitOrigin-RevId: 1a45214c9c4ffc983e1e16affc6828733b45f8e3
2024-09-23 11:33:44 +02:00
Anton Kozub
7de67c194d Fixed k2 tests
GitOrigin-RevId: e78e44dd226f278e2b193a2e6d6387e6c51b0800
2024-09-22 22:19:57 +00:00
Yan Zhulanow
2d98b82498 Merge commit '01ea7febdf60fc553fa00e01f3c26bc65ea86093'
GitOrigin-RevId: fdc1aeb406753b305b71f04d8137ab190b52a1aa
2024-09-20 14:57:29 +02:00
Alexey Merkulov
2ded2d49a7 IDEA-346086 Fix error on run-to-cursor to non-loaded yet lambda or anonymous class in Kotlin
In Java, the engine can precisely identify the compiled names of classes for the required line. So the check will tell for sure that run-to-cursor will fail. But in Kotlin, the code generation can produce different compiled class names depending on options. It is not easy to be sure in the names while debugging. So better to try to execute run-to-cursor command anyway.

GitOrigin-RevId: 7332655691bb853355af825238c32b4d21d06989
2024-09-17 21:36:45 +00:00
Egor Ushakov
cc26d18e9e [kotlin debugger] pass INVOKE_NONVIRTUAL only when needed
GitOrigin-RevId: 7f0e5cd12a81cb61f92d6da0bb0d4fbf2cbd2a12
2024-09-12 16:24:39 +00:00
Alexey Merkulov
f3c5c5b2b2 [debugger] IDEA-358892 Fix incorrect CoroutineContext parameter
GitOrigin-RevId: 292a4296243632d2ce76848d61ad18a66c1293db
2024-09-11 04:23:05 +00:00
Maksim Zuev
bac29e8431 [debugger] IDEA-357571 Reuse Java mark object provider in Kotlin
Merge-request: IJ-MR-143713
Merged-by: Maksim Zuev <Maksim.Zuev@jetbrains.com>

GitOrigin-RevId: 8e12de6d84f602f430f85ff8e3dc322464a81024
2024-09-09 16:52:33 +00:00
Egor Ushakov
4c4c5f167f [debugger] log suspend context on evaluation errors
GitOrigin-RevId: 08155a21ad876986379660bc388070a356cfaab3
2024-09-09 12:18:27 +00:00
Egor Ushakov
77613d30b1 [kotlin debugger] moved DebuggerUtils.instanceOf usage into the base eval4j impl
GitOrigin-RevId: ba7947a0658f97332f34aa4fd9c9ac73e1ce2501
2024-09-09 11:38:10 +00:00
Egor Ushakov
34b7faad36 [kotlin debugger] lazy get value type
GitOrigin-RevId: 9bee1fd4daf86b92a8149e2b8ed6c36e148cb577
2024-09-06 18:51:50 +00:00