Commit Graph

103571 Commits

Author SHA1 Message Date
Dmitrii Gridin 601ffb2db4 [LL FIR] transform script body properly
Problem: transformSingle for expressions can return another expression,
and we should replace the original one with such new expression

^KT-61011 Fixed
^KT-61009 Fixed
2023-08-08 15:40:47 +00:00
Aleksei.Glushko 0a09d1e140 [K/N] Use ptr-sized types in objc_firendly_dealloc tests
Merge-request: KT-MR-11525
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-08-08 15:38:36 +00:00
Ilya Gorbunov 0072189fb1 [stdlib-mpp] Configure SBOM for published artifacts KT-53791 2023-08-08 12:32:18 +00:00
Dmitrii Gridin 2688398361 [FIR] FirTypeUtils: add debug info 2023-08-08 12:04:46 +00:00
Dmitrii Gridin 55a253db04 [AA FIR] KtFirExpressionTypeProvider: add debug info 2023-08-08 12:04:46 +00:00
Alexander Udalov 4af1970b28 Build: allow empty build cache url to disable it 2023-08-08 11:25:20 +00:00
Nikolay Lunyak 71cc634a7c [FIR] Prevent missing diagnostics on free lambdas
The change in `FirPsiDiagnosticTestGenerated.Resolve#testCast`
only highlights the existing
problem that we don't assign a
valid type to `_`.

^KT-58906 Fixed
2023-08-08 11:00:04 +00:00
Igor Chevdar 9a719066e3 [K/N][tests] Added a reproducer for #KT-60371 2023-08-08 10:10:47 +00:00
Igor Chevdar 2f463f740f [K/N][tests] Fixed CachesAutoBuildTest & IncrementalCompilationTest
In auto-cache mode, the compiler itself chooses the system cache directory,
and it is important to not pass it explicitly.
2023-08-08 10:10:47 +00:00
Dmitriy Dolovov 3b626ea97c [Commonizer] Replace ResettableClockMark by TimeSource.Monotonic 2023-08-08 09:40:18 +00:00
Kirill Rakhman 09f895efe6 [FIR] Implement VERSION_REQUIREMENT_DEPRECATION diagnostics 2023-08-08 09:28:08 +00:00
Kirill Rakhman 65ea9697ab [FIR] Let DeprecationsProvider.getDeprecationsInfo accept LanguageVersionSettings 2023-08-08 09:28:08 +00:00
Margarita Bobova 62b7760c92 Verification metadata: temporary allow 1.9.20 and 1.9.30 version 2023-08-08 09:12:16 +00:00
Abduqodiri Qurbonzoda 21619264d0 [K/N] Add a note to Regex documentation about future changes of behavior
This note will allow us to fix https://youtrack.jetbrains.com/issue/KT-58198/Native-Regex-issues in the future.

Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>


Merge-request: KT-MR-11387
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-08-08 08:21:10 +00:00
Kirill Rakhman 8ae751926c [FIR] Let OptIn LV checker only run on last module in HMPP compilation
This fixes an issue where the opt-in annotation is defined in one of the
source sets of the compilation but opt-ins are defined for the whole
compilation which leads to false-positive "Opt-in requirement marker is
unresolved" in (e.g. common) source sets that don't have a dependency on
the module that contains the annotation.

#KT-60755 Fixed
2023-08-08 07:57:56 +00:00
Nataliya.Valtman 2719dd188f Added build metrics for Kotlin/Native tasks
#KT-58315 Fixed

Co-authored-by: Nataliya Valtman <Nataliya.Valtman@jetbrains.com>


Merge-request: KT-MR-11343
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-08 07:43:18 +00:00
Ivan Kylchik 7cbf3b28ca [K2] Properly serialize annotation that has vararg with single argument
#KT-60163 Fixed
2023-08-08 07:01:48 +00:00
Sebastian Sellmair 8ff2782045 [Gradle] Promote val Project.kotlinToolingVersion
^KT-61034 Verification Pending
2023-08-08 06:50:01 +00:00
Timofey Solonin d2728e0baf Advance bootstrap to 1.9.20-dev-9102 2023-08-08 04:12:08 +00:00
Alexander Udalov cceb138c6c Stdlib: do not check radix twice in Byte/Short.toString
`checkRadix` is already called in `Int.toString`.
2023-08-07 21:47:10 +00:00
Yan Zhulanow a064db8da6 [LL API] Add some more 'ContextCollector' tests 2023-08-07 16:22:03 +00:00
Yan Zhulanow 6c26aeeb97 [LL API] Check declaration resolution status in 'ContextCollector' tests 2023-08-07 16:22:03 +00:00
Yan Zhulanow ee22cc08d1 [LL API] Streamline target declaration processing 2023-08-07 16:22:03 +00:00
Yan Zhulanow f31ffe4404 [LL API] Avoid unnecessary BODY context collection 2023-08-07 16:22:03 +00:00
Yan Zhulanow 81d829ce3b [LL API] Collect context for enum entries 2023-08-07 16:22:03 +00:00
Yan Zhulanow b76a388e35 [LL API] Ignore annotation arguments in 'ContextCollector' 2023-08-07 16:22:03 +00:00
Yan Zhulanow 4fbbe9f274 [LL API] Add in-body modification tests for code fragments 2023-08-07 16:22:03 +00:00
Yan Zhulanow 75868d5f52 [LL API] Preserve the original 'FirCodeFragment' after in-body change 2023-08-07 16:22:03 +00:00
Yan Zhulanow 27a15cd76d [LL API] Add more flexible 'preferBodyPredicate'
The previous API required to pass the exact declaration element to
the 'ContextCollector'. Now it's possible to get a 'BODY' context for
some ancestor element.
2023-08-07 16:22:03 +00:00
Yan Zhulanow c565b659c2 [LL API] Refactoring, get rid of 'javaClass' usage 2023-08-07 16:22:02 +00:00
Yan Zhulanow 06581cee86 [LL API] Refactoring, make 'timestamp' a member 2023-08-07 16:22:02 +00:00
Yan Zhulanow a09c2a485e [LL API] Add basic tests for 'ContextCollector' 2023-08-07 16:22:02 +00:00
Yan Zhulanow fcefdcc3e9 [LL API] Move PSI element context collection to 'ContextCollector'
The new API is going to be reused in 'KtFirScopeProvider'.
2023-08-07 16:22:02 +00:00
Yan Zhulanow 6413294f3f [Analysis API] Fix module provider for files from dependent sessions
Files coming from dependent sessions might be fully virtual, so there
won't be any backing 'VirtualFile'. However, they generally belong to
their original file's module.
2023-08-07 16:22:02 +00:00
Yan Zhulanow f503d2a3fc [LL API] Set the resolved status for the foreign BODY_RESOLVE property 2023-08-07 16:22:02 +00:00
Yan Zhulanow 51a4f22830 [LL API] Fix default parameter value processing in 'ContextCollector'
Remove the additional 'lazyResolveToPhase()' as there's a need to
analyze to 'BODY_RESOLVE' anyway to collect the 'BODY' context.
2023-08-07 16:22:02 +00:00
Yan Zhulanow 0800acd30e [LL API] Fix 'BODY' context collection for value parameters 2023-08-07 16:22:02 +00:00
Yan Zhulanow 24a1913559 [LL API] Avoid traversing the same smart cast expression twice 2023-08-07 16:22:02 +00:00
Yan Zhulanow 8440cbf939 [LL API] Make smart cast ordering in 'ContextCollector' predictable 2023-08-07 16:22:02 +00:00
Yan Zhulanow 909a6930e8 [LL API] Avoid processing the 'FirFile' twice on context collection 2023-08-07 16:22:02 +00:00
Yan Zhulanow 9a9b16ed41 [LL API] Do not wrap body or lambdas in 'forFunctionBody()'
The function is only intended to be called for 'FirSimpleFunction's.
2023-08-07 16:22:02 +00:00
Yan Zhulanow 9baef497a8 [LL API] Add missing resolution for enum values on context collection 2023-08-07 16:22:02 +00:00
Yan Zhulanow b1895aacc1 [LL API] Use a common type of 'KtDeclaration' and 'KtCodeFragment' 2023-08-07 16:22:02 +00:00
Yan Zhulanow a04ad5aa28 [LL API] Refactoring, use the 'iterator {}' utility 2023-08-07 16:22:02 +00:00
Yan Zhulanow 00902fdd9c [LL API] Make 'FirFile.codeFragment' an LL-internal API 2023-08-07 16:22:02 +00:00
Yan Zhulanow 1a353b544b [LL API] Remove unnecessary safe type check in 'FirCodeFragment.psi' 2023-08-07 16:22:02 +00:00
Yan Zhulanow 4fa2a24118 [LL API] Refactoring, replace a 'Pair' with a 'ContextKey' data class 2023-08-07 16:22:01 +00:00
Yan Zhulanow 8a5cab6831 [LL API] Support '_DebugLabel's in code fragments 2023-08-07 16:22:01 +00:00
Yan Zhulanow af51b41a8a [LL API] Support on-air resolution in 'FirCodeFragment' 2023-08-07 16:22:01 +00:00
Yan Zhulanow e1db3c88cf [LL API] Support code fragment compilation 2023-08-07 16:22:01 +00:00