Commit Graph

106263 Commits

Author SHA1 Message Date
Pavel Kunyavskiy 763d2ec2fe [IR] Move IrGetValue.actualize() to IrUtils and rename it
^KT-62292
2023-11-20 08:31:41 +00:00
Pavel Kunyavskiy e80d4b1d60 [IR] Move IrDeclaration.isExpect to IrUtils
^KT-62292
2023-11-20 08:31:41 +00:00
Pavel Kunyavskiy 41098a2e34 [IR] Extract IrDiagnosticReporter interface
^KT-62292
2023-11-20 08:31:41 +00:00
Pavel Kunyavskiy faaefbd8e7 [IR] Move .parents and .parentsWithSelf to IR utils
^KT-62292
2023-11-20 08:31:41 +00:00
Pavel Kunyavskiy 649a7bd66b [IR] Moved actualizer and related things to separate module
^KT-62292
2023-11-20 08:31:41 +00:00
Ilya Gorbunov 62700c3ec3 [stdlib] K/N ArrayList: restore constructor docs, correct modifier order 2023-11-20 02:24:40 +00:00
Ilya Gorbunov aa4419b7e3 [stdlib] Explicit visibility and return types: Collections 2023-11-20 02:24:40 +00:00
Ilya Gorbunov 0dd61c9f81 [stdlib] Explicit visibility and return types: Duration 2023-11-20 02:24:40 +00:00
Ilya Gorbunov da1d3be7f2 [stdlib] Explicit visibility and return types: StringBuilder 2023-11-20 02:24:40 +00:00
Ilya Gorbunov 92b3131c12 [stdlib] Explicit visibility and return types: HexFormat 2023-11-20 02:24:40 +00:00
Ilya Gorbunov 02e933b3ff [stdlib] Explicit visibility and return types: common 2023-11-20 02:24:39 +00:00
cristiangarcia 7a267afeae Assert build.number is present if deployVersion is
KTI-1454 Fail instead of producing the wrong artifacts
2023-11-18 21:25:55 +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
Mikhail Glukhikh ceded87a3a K2: add more comments to subsequent visibility checks
Related to KT-63164
2023-11-17 20:29:58 +00:00
Mikhail Glukhikh ec7caba8ea K2: restore smart cast in case with invisible receiver but visible callable
Related to KT-52432
#KT-63164 Fixed
2023-11-17 20:29:58 +00:00
Mikhail Glukhikh a139965231 K2: reproduce KT-63164 2023-11-17 20:29:58 +00:00
Marco Pennekamp 271f83d07d [LL] Disable declaration modification service tests temporarily
- We cannot configure write access using the application environment
  creation because application environments are cached between test
  runs.

^KT-63560
2023-11-17 18:09:55 +00:00
Ilya Gorbunov 23e0e40acc Create a copy of shared code for building JVM part of native interop runtime
This is required because IDEA cannot import the same directory in multiple modules.
2023-11-17 17:30:58 +00:00
Ilya Gorbunov 66639d37ec [kotlin-test] Explicit public visibility and return types 2023-11-17 17:20:51 +00:00
Ilya Gorbunov 3a5276f4d3 [stdlib] Fix compilation warnings in js-ir-minimal 2023-11-17 17:19:05 +00:00
Leonid Startsev 477c668c80 Promote most deprecations in kotlinx-metadata-jvm to ERROR
because WARNING versions of them were already released at some point.

The following declarations were not promoted and have to be promoted later:

- KmProperty.hasGetter, .hasSetter
- Deprecations from readStrict/readLenient/write() rework

#KT-63157 In progress
2023-11-17 16:23:34 +00:00
Aleksandra.Arsenteva af63763da2 KT-62138 add testcases 2023-11-17 15:47:34 +00:00
Aleksei.Cherepanov 079343c093 Return the default value if an illegal argument is passed..
..to the TargetPlatform during the import process.

#KTIJ-27718 Fixed


Merge-request: KT-MR-13072
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-11-17 14:46:35 +00:00
Kirill Rakhman 4964ee12a9 [CLI] Update CLI argument descriptions after review 2023-11-17 14:36:28 +00:00
Dmitriy Dolovov bc8841c6fe [Gradle][MPP] Don't save library dependency versions in KLIB manifest
^KT-62515
2023-11-17 13:49:29 +00:00
Artem Kobzar e64068cf82 [K/JS, K/Wasm, K/Native] Process anonymous initializers inside classes as a part of their primary constructors ^KT-61929 Fixed 2023-11-17 13:04:34 +00:00
Yahor Berdnikau 3413b07550 [IC, Gradle] Remove 'kotlin.incremental.useClasspathSnapshot' system property
^KT-62962 Fixed
2023-11-17 11:34:19 +00:00
Bogdan Mukvich f558b0dc55 Update build-env docker image
* Update debian base image
* Update JDK 8, JDK 11
* Add JDK 17, JDK 21
* Update maven
* Add java to PATH
2023-11-17 11:23:23 +00:00
Ilya Goncharov 342c9e8c81 [Gradle, JS] Set compiler arg ir and produce-* unconditionally
^KT-63312 fixed
2023-11-17 10:25:21 +00:00
Pavel Punegov 41477b25a1 [K/N][test] Fixup target toolchain path for swift compilation
Use a parent path in fallback framework path environment variable.
This fixes failures caused by the 3aeca1956e.
See also MR-KT-12948
2023-11-17 10:16:30 +00:00
Pavel Punegov a53c96e790 [K/N][test] Fixup target toolchain path for ExecClang
This fixes failures caused by the 3aeca1956e.
See also MR-KT-12948
2023-11-17 10:16:30 +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
Anton Lakotka 980708e533 [Gradle] Check if host-specific metadata artifact exists for GMT
In gradle metadata transformations for CInterops in composite builds
it is possible that resolved artifact is not actually created.
For example if host machine is not MacOS but composite build has
projects with enabled Apple targets. So apple-specific tasks will be
disabled but still configured and during dependency resolution
its outputs will be provided in artifact view.

We have already checked for cases when there is no resolved artifact.
But apparently it is not enough, and it is important to check that file
exists physically.

^KT-63197 Verification Pending
2023-11-17 08:00:40 +00:00
Anton Lakotka 9fc7d3693e [Gradle] Test composite build import with enabled CInterop commonization
On non-mac machines. With projects that have enabled MacOS targets.

In this scenario we don't want to ruin IDE UX for users that just
want to use IDE and work with project parts that is not related to apple

^KT-63197
2023-11-17 08:00:40 +00:00
Alexander Shabalin 9ad7b00613 [K/N] Migrate some runtime/workers tests to new testing infra ^KT-61259 2023-11-17 07:42:28 +00:00
Alexander Shabalin fd1579186f [K/N] Migrate misc runtime/ tests to new testing infra ^KT-61259 2023-11-17 07:42:28 +00:00
Ilya Kirillov 364dcd30c8 [LC] optimize String allocations in org.jetbrains.kotlin.asJava.LightClassUtil.isMangled
^KT-63486 fixed
2023-11-17 07:19:14 +00:00
Stanislav Ruban 6edc742934 [tests] builder inference test-set: regenerate diagnostic & codegen tests 2023-11-17 07:02:15 +00:00
Stanislav Ruban 196f5760f8 [tests] BI (1P&1TV/1TIO): add test data for sinks & sources of type information [1/X]
single builder parameter
single postponed type variable
single origin of type information

cover member properties as type info sinks;
cover extension functions as type info sinks;
cover extension properties as type info sinks;
cover extension functions as type info sources;
cover extension properties as type info sources;
cover input values of builder arguments as type info sinks;
cover input values of builder arguments as type info sources;
cover return types of builder parameters as type info sources;

relevant issues:
KT-61907
KT-61909
KT-63477
2023-11-17 07:02:15 +00:00
strangepleasures 9c2ce475e2 KT-60821 [KAPT] Generate stubs without KaptTreeMaker
Merge-request: KT-MR-12979
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2023-11-16 21:14:36 +00:00
Mikhail Glukhikh 0fba58eee7 K2: repeat K1 logic around SAM-based candidates discrimination
#KT-56614 Fixed
2023-11-16 20:12:34 +00:00
Mikhail Glukhikh ce381f335d K2: reproduce KT-56614 2023-11-16 20:12:34 +00:00
Marco Pennekamp 39c38aa588 [PSI] KtQualifiedExpression: Replace AssertionError with errorWithAttachment
- There is no other usage of `AssertionError` in the
  `org.jetbrains.kotlin.psi` package. `errorWithAttachment` is more
  idiomatic, throws an `Exception` instead of an `Error`, and avoids
  leaking user code.
2023-11-16 19:50:51 +00:00
Marco Pennekamp 6668cc281d [LL] Avoid exceptions when analyzing inconsistent PSI in LLFirDeclarationModificationService
- The exceptions in KT-63130 occur because PSI tree change events may be
  published when parts of the PSI under modification are inconsistent.
  Such inconsistent elements are then analyzed by
  `LLFirDeclarationModificationService` to check if the modification
  occurs in a contract statement.
- The solution adds `*OrNull` functions to `KtQualifiedExpression` which
  return `null` instead of failing with an exception when the receiver
  or selector cannot be found.

^KT-63130 fixed
2023-11-16 19:50:51 +00:00
Marco Pennekamp 6c67835128 [LL] Add PSI resilience tests for LLFirDeclarationModificationService
- The cause of KT-63130 is that `LLFirDeclarationModificationService`
  tries to analyze inconsistent PSI. These new tests replicate the
  inconsistent PSI by deleting different children and then call the
  declaration modification service with it, making sure that the service
  doesn't throw any exceptions. Both exceptions mentioned in the issue
  are reproduced by the added tests, specifically, the receiver and
  selector resilience tests for dot-qualified expressions.
- A few of the tests need to be marked with `IGNORE_FIR` until the error
  has been fixed in the subsequent commit.

^KT-63130
2023-11-16 19:50:51 +00:00
Marco Pennekamp 12b6096b67 [LL] Add a test base for PSI-modifying low-level API tests
- To support PSI modification, the test environment requires some
  additional configuration, which is encapsulated in
  `AnalysisApiPsiModificationTestServiceRegistrar`.
- The test also has to allow write access explicitly, which is
  configured in `AnalysisApiFirModifiablePsiSourceTestConfigurator`.
2023-11-16 19:50:51 +00:00
Marco Pennekamp 03a7162f37 [AA] Enable test-specific configuration of write access permissions
- In general, Analysis API tests forbid write access because the
  Analysis API should not be used from write actions. However, in some
  cases we might want tests to e.g. modify PSI, which requires write
  access. This change allows `AnalysisApiTestConfigurator`s to enable
  write access for the specific test.
2023-11-16 19:50:51 +00:00
Marco Pennekamp 6189d68c3c [AA] Refactoring: Provide default implementations for functions of AnalysisApiTestServiceRegistrar
- Most inheritors of `AnalysisApiTestServiceRegistrar` only need to
  override one or two functions.
2023-11-16 19:50:51 +00:00
Ivan Kochurkin df43226a08 [FIR] Fix CAST_NEVER_SUCCEEDS for definitely not null types 2023-11-16 19:29:58 +00:00
Ivan Kochurkin 0efcad51e9 [FIR] Add a comment to isSubtypeOfClass that explains what this method does
And what the difference is between `isSubtypeOf` and `isSubtypeOf`
2023-11-16 19:29:58 +00:00