Commit Graph

455616 Commits

Author SHA1 Message Date
Mikhail Golubev
e2d7d259e9 PY-76243 Don't build implicit union types for conditional definitions and names imported from stub packages
Also fixes PY-59014, PY-39761.

PyResolveImportUtil returns both .pyi stubs and the corresponding .py files for stub packages
to support partial stub packages. See the line:

```
groupedResults.topResultIs(Priority.STUB_PACKAGE) -> firstResultWithFallback(groupedResults, Priority.STUB_PACKAGE)
```

in PyResolveImportUtil.filterTopPriorityResults.

It means that, for instance, resolving the QuerySet name in type hints led to QuerySet
definitions from both places. Then, PyTypingTypeProvider.getType() for the reference expression
"QuerySet" returned a union type containing PyClassTypes for both of them, we couldn't parameterize
it in PyTypingTypeProvider.getParameterizedType and returned Any.

It's wrong that while evaluating type hints, we interpret multiple declarations as
a union type. Those should only be explicitly expressed with typing.Union or "|" operator.
This behavior was originally added in PY-18427 as an ad-hoc way to support version checks
for type hints, but now it seems detrimental because it's unclear how to parameterize
such implicit unions of generic types then.

Other type checkers also don't treat conditional definitions like that. For instance, for
conditional type aliases, Mypy complains about the name being defined twice and then uses
only the first definition, and Pyright doesn't consider names under conditions other than
version checks as valid type aliases at all. Both type checkers also support partial stub
packages properly.

GitOrigin-RevId: 1ecc7ab5d09625d10850ddc0e1f7761332ccddd5
2024-09-30 13:32:14 +00:00
Oleg Taratukhin
28f446816d [ai-completion] ML-3769 use relaxed match as a secondary metric in reports
GitOrigin-RevId: a627b2db311d143beff96c388f0b67505910dbdb
2024-09-30 13:31:52 +00:00
Oleg Taratukhin
5df70be0ba [ai-completion] ML-3769 avoid NaNs in metric values for highlighting of a multi-line report
GitOrigin-RevId: 21f49fbc798607a0a1caf123acf197146e672dea
2024-09-30 13:31:52 +00:00
Aleksey Dobrynin
1e33820cb3 [java, compilation-charts] disable magnifying for mac (by default)
GitOrigin-RevId: 8c8a628d7608b99e046d3ec259f4f989cb34a718
2024-09-30 13:31:26 +00:00
Alexandr Evstigneev
fe9254efb5 IDEA-358678 Properly compute injection start
- First newline character
- First non-space character
- Any character after indentSize space characters

GitOrigin-RevId: 80f413bb01cf784ed0f9266af35cc503a0f9f05f
2024-09-30 13:30:50 +00:00
Lev Leontev
6c46345ea6 [plugins] BAZEL-1041: iterate maps more efficiently in IdeaPluginDescriptorImpl.doRegisterExtensions
GitOrigin-RevId: 5ed54dfe9d5520e2c0f46b75f9e1700a03a404e7
2024-09-30 13:24:08 +00:00
Anna Kozlova
d9142b0d7a [kotlin] k2: review comments on PublicApiImplicitTypeInspection
report only internal functions if `private` is chosen, similar to K1

KTIJ-31407

GitOrigin-RevId: a67f12735a0ca4bb4aceed76a872a4a69c49247f
2024-09-30 13:20:47 +00:00
Anna Kozlova
ed759bcc55 [kotlin] k2: support KMP tests navigation
^KTIJ-27848 fixed

GitOrigin-RevId: c9b70490551cf2f3f4b8a3c61f467517b5d8f209
2024-09-30 13:20:47 +00:00
Anna Kozlova
a43aa6fee3 [kotlin] k2: restore navigation to registry keys located in plugin.xml
- Registry was converted from java to kotlin, then resolve inside sources start to return functions from the companion object. At the same time, decompiled code still returns bridges from Registry itself and thus was not affected by the bug.
- Test covers now only "sources" case, because the compiled case is covered by java/k1 tests.

^KTIJ-31444 fixed

GitOrigin-RevId: 59dfa24c89b89057e6af3e5da939cf7a93bdb8fa
2024-09-30 13:20:47 +00:00
Anna Kozlova
644c0d4252 [kotlin] get rid of LC during goto test
^KTIJ-21111 fixed

GitOrigin-RevId: aa3270f444bbe33edae0a8ba166df3ff0625a1c1
2024-09-30 13:20:47 +00:00
Mikhail Pyltsin
75d5071519 IJ-CR-145484 [java-highlighting] IDEA-358686 Moving file from outside of source roots doesn't help to remove banner
- fix leaking

GitOrigin-RevId: 9e3d6e9f1806b5ba1d9cbe019dccd310edcc713d
2024-09-30 13:17:30 +00:00
Dmitry Zhuravlev
3197c2a07d [rdct] enable GPG pinentry for cherry-pick & rebase commands
Follow-up: a06ba8c87946fb3a9b2818996e81e81a4ed90408

GitOrigin-RevId: b229be825c90b82a2b28fd157d5b01bc54551d29
2024-09-30 13:12:04 +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
Frederik Haselmeier
436f5dd33f [kotlin] Use better way of getting module's Kotlin version for BuildProcessSatisfactionDialog
KTIJ-31263

GitOrigin-RevId: a03fa483ff0a4f2b4aaa723165c4ef872d62fe11
2024-09-30 12:46:04 +00:00
Vladimir Krivosheev
12457d13b6 do not export intellij.platform.structureView.impl
GitOrigin-RevId: 406daf4853edb806de43c1118f4c052f0415bdc4
2024-09-30 12:23:30 +00:00
Frederik Haselmeier
bf5f7a8de6 [kotlin] Also attempt to download IDE plugin dependencies from Kotlin IDE repository
KTIJ-30704

GitOrigin-RevId: b433afdfa3dd9cc287ba3842e5182faa860916e4
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
8e7d33cd2f [Kotlin] Updated bundled Kotlin JPS to 2.0.20
KTIJ-30704

GitOrigin-RevId: c96d07e75faa4a2a6a997ed27d09cd746cf5bb04
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
f36023b008 [Kotlin] Added Kotlin JPS 2 to plugin-content.yaml
KTIJ-30704

(cherry picked from commit 372b6b81478f7532f10db404ca98894900a44856)

GitOrigin-RevId: 9aa828ff27b4a24286f63200611c5f62dfa129a8
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
dfd9d19530 [Kotlin] Changed Kotlin/JS configurator to work with new klib format
Temporarily disabled broken Kotlin/JS tests

^KTIJ-30756 fixed

(cherry picked from commit 44577a65c2b7c409f1195a0d163223b00fc0fac3)

GitOrigin-RevId: 9d529dd36789d023b72b61490439d1074b395590
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
9df85104f5 [Kotlin] Updated J2K tests to work with Kotlin 2.0
KTIJ-30704

(cherry picked from commit 781486f26b3e1d51cebb582705a2dfa55f707ba1)

GitOrigin-RevId: f4855b74026078fec42f7b90dc9a6417dbd02dd5
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
b65401748e [Kotlin] Updated IntentionTests to work with JPS 2.0
KTIJ-30704

(cherry picked from commit aef3ffcd4d337ba5e1a904b423f5026c8be6076d)

GitOrigin-RevId: 875d837d188c6f644b2780a55310e9803cd8cb84
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
7a50450497 [Kotlin] Fixed KMP completion tests to account for new Kotlin 2.0 completions
KTIJ-30704

(cherry picked from commit eb4072f0f137d1e6e3df6384a970052c2f5e6811)

GitOrigin-RevId: 4f628cb433171a5bfc85d05151298273683ad7c6
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
e3a98f4209 [Kotlin] Deleted quick-fix tests for fully qualifying calls with ambiguous resolution.
This is no longer needed when using JPS 2.0 because the K2 compiler has changed the resolution to the new way.

KTIJ-30704

(cherry picked from commit 98f33cb4238b9c2ad50e5ca40bf1ef9cfd7ca1b2)

GitOrigin-RevId: 9c29f53dfd939a542cc22a38e0b11f424c8a44c0
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
b8a516268a [Kotlin] Fixed K2DataFlowInspectionTest to work with JPS 2.0.0 compiler
KTIJ-30704

(cherry picked from commit b2b1cfa0e0563f9bf1c850563e3d048b9be658f0)

GitOrigin-RevId: 049f781f105929bd1b1b50adeec972fd6f989901
2024-09-30 12:16:32 +00:00
Frederik Haselmeier
049845a50f [Kotlin] Fixed test errors in K1QuickFixTestGenerated caused by JPS upgrade to Kotlin 2.0.0
KTIJ-30704

(cherry picked from commit 83e6e0ed408077d7ea94f840ca20f80c1c7c413b)

GitOrigin-RevId: 0aecb9ad289bfb120ab903ce85292a2e120d14e5
2024-09-30 12:16:31 +00:00
Frederik Haselmeier
1e5a4b3e8f [kotlin] Correctly replace toolchain version in convention plugin for tests
KTIJ-31047

GitOrigin-RevId: 8202d3700daf440f1ac4ab16285e69a09dfdad14
2024-09-30 11:50:37 +00:00
Frederik Haselmeier
267b8ea65b [kotlin] Added AbstractGradleModuleBuilder method to disable settings script generation
KTIJ-31047

GitOrigin-RevId: e74d61a7dd113bf225f0df9ade691aee3781dd91
2024-09-30 11:50:37 +00:00
Frederik Haselmeier
94bc1d5924 [kotlin] Use new libraries version store in Gradle wizard
KTIJ-31047

GitOrigin-RevId: bc00ea9d0abbd638bfecf24b1339657093dd4a70
2024-09-30 11:50:37 +00:00
Frederik Haselmeier
7cdb141634 [kotlin] Added tests for new Gradle Kotlin multi-module wizard
KTIJ-31047 fixed

GitOrigin-RevId: a0b9120f45d76119a354b29bd232ad7f5634964f
2024-09-30 11:50:37 +00:00
Frederik Haselmeier
c593d50a45 [kotlin] Added option to generate Kotlin/Gradle projects using buildSrc and convention plugins
KTIJ-31047

GitOrigin-RevId: 7eb3fca36a1dcbcca51760533c22e44da017910d
2024-09-30 11:50:37 +00:00
Dmitry Kichinsky
643625a07e [maven] KTIJ-31415 do not extend legacy MavenImporter in KotlinMavenImporter
GitOrigin-RevId: 592228e7128286a0d1ba654e1ac1ff8d92e1ff95
2024-09-30 11:42:02 +00:00
Andrey Lisin
86a44e2b79 PY-72239 Cleanup: replace deprecated ImmutableSet.of with Collections.singleton
GitOrigin-RevId: 4d223701e964f19107d23ebcfeec8b86ab83210b
2024-09-30 11:02:49 +00:00
Andrey Lisin
aae7c6e856 PY-72239 Fix Python data viewer env-tests
GitOrigin-RevId: 19d66d158a367e98b1eead93955fcdea11f35e0d
2024-09-30 11:02:49 +00:00
Andrey Lisin
042bff72e7 IJ-CR-143143 Remove @RequiresBackgroundThread annotations due to many broken tests
GitOrigin-RevId: 1e8a4a9d91626d0eb80534e992747155c745bbd5
2024-09-30 11:02:49 +00:00
Maxim.Kolmakov
13de2bf02f Add IJ Perf mode field
This field will help to differentiate tests based on some configuration:
* split vs monolith
* custom JBR
* Kotlin K1 vs K2
* custom GC
and so on

GitOrigin-RevId: aae71f28d6c57dfdc3d9a8a7365662bf353f6d5b
2024-09-30 10:55:31 +00:00
Maxim.Kolmakov
cdaf3f39b0 Remove additional unused fields from IJPerfMetricsDto
GitOrigin-RevId: 075e028393113b8405eb194a73eaf9e09089e631
2024-09-30 10:55:31 +00:00
Maxim.Kolmakov
6f0c674d64 Remove CIServerBuildInfo
It's not used anywhere and requires TC/CI integration

GitOrigin-RevId: 59f27fa3b2a6903d25460e1490b2fb8bf09819b0
2024-09-30 10:55:31 +00:00
Alexander Lobas
69b39c923a IJPL-163124 Spelling in uninstall feedback dialog
GitOrigin-RevId: 7ea1fdcfcb4b7d167e9a805b8e57e54fe7017a1c
2024-09-30 10:00:45 +00:00
Vladimir Krivosheev
ea2c7ad846 no reason to use Java 9 level for jshell - level was set to 9 for historical reasons (JShell comes bundled into JDK since Java 9)
GitOrigin-RevId: 439f243000b8c3244308571f9466aeb0400fdb70
2024-09-30 09:09:01 +00:00
Vladimir Krivosheev
bd0ab93581 IJPL-163178 fix "Accessing disposed message bus MessageBus" (part 2)
GitOrigin-RevId: 5214f7dcedce61e746cb1d52cb8912ee8e3ef2b9
2024-09-30 08:52:33 +00:00
Maxim.Kolmakov
bd56198eab Don't fail parsing of arguments if there is additional argument
Otherwise it's not possible to add new parameters to the command without breaking old versions of IDE

GitOrigin-RevId: 4d2d8e7ab87bac4435f42a430d1c129f4b5cac9a
2024-09-30 08:48:33 +00:00
Mikhail Pyltsin
ae2e2f737c IJ-CR-145218 [java-inspections] IDEA-201932 Provide inspection to highlight redundant creation operations in java date time api
- delete unnecessary test

GitOrigin-RevId: 80f107de3e637bc81065c9bacf7024c76a5bbb81
2024-09-30 08:37:06 +00:00
Vladimir Krivosheev
21455e7254 IJPL-162718 we don't need user progress for createProject - wizard progress is enough
GitOrigin-RevId: 9dac25ec3764e6f6bd7eb46ed3011da0597c3b1a
2024-09-30 07:43:36 +00:00
Vladimir Krivosheev
47aa859a4f IJPL-162718 cleanup
GitOrigin-RevId: a6e1230e80d57d34d6f674c0c1296e0bdf14c38b
2024-09-30 07:43:36 +00:00
Vladimir Krivosheev
412375e109 IJPL-162718 don't use blockingContext - doesn't make sense now
GitOrigin-RevId: 47bfe635ae0089b4c2ef80e2a8bc23d71d9dbded
2024-09-30 07:43:36 +00:00
Ilya.Kazakevich
3c609288dd Skip Eel Local test on Windows on TC
We now use `helper.py` which is a cumbersome because Windows agents do not have python by default.

We need to use kotlin script to make helper both cross-platform and independent of the runtime.

As for now, we simply disable in on the TC@Windows.

GitOrigin-RevId: 0daf7f1d25cc57bb3afe1e6aace67ccb15637c04
2024-09-30 05:41:30 +00:00
Ilya.Kazakevich
a846672bcd Unused class removed
GitOrigin-RevId: 841c2062565760fe21c56f76655662c3f436a61e
2024-09-30 05:41:30 +00:00
Ilya.Kazakevich
15709df0cc typo fixed
GitOrigin-RevId: f649d77a0f135deebcdcb2133e55be6775576abd
2024-09-30 05:41:30 +00:00
Ilya.Kazakevich
75801d4c3e PY-75910: Update project name automatically in NPW even if field is hidden.
`getComponent` accepts `projectPathField`.
We use `ProjectPathProvider` to update project name from this field.

V2 panels are also affected: they now share logic (`ProjectPathFlows`) with project name component.

See `com.jetbrains.python.newProjectWizard.projectPath`

GitOrigin-RevId: f7b306fbbd9777925274513effd56009a0614f9a
2024-09-30 05:41:30 +00:00
Vladimir Kharitonov
54c75955e7 JBR-7664 JCEF: call CefBrowser#notifyScreenInfoChanged() only if the scale is changed
GitOrigin-RevId: d5b9242f6c9d71fcaab7c9a4269415d7230cf820
2024-09-29 22:57:23 +00:00