Commit Graph

1397 Commits

Author SHA1 Message Date
Ian Lynagh
5ea4c44701 Kotlin: Give some more informative errors messages 2023-09-05 12:33:49 +01:00
Ian Lynagh
a2659eecfb Merge pull request #14018 from igfoo/igfoo/extractor_information_kotlin1
Kotlin: Write usesK2 ("uses Kotlin 2") information to the database
2023-09-04 13:38:23 +01:00
Ian Lynagh
181594badb Kotlin: Add packageFqName and IrSymbolInternals compatibility
In master, we need to switch to these, but for building for older
versions we need to add our own support.

Currently the v_1_9_255 files are nto used, but we will need them (in a
differently-named directory) for a future release.
2023-09-01 11:20:58 +01:00
Ian Lynagh
72e08a9277 Kotlin: Tweak the build system
You can now make a versions/* directory that the build system doesn't
know about. This can be used to add support for not-yet-supported
versions.
2023-09-01 11:08:54 +01:00
Ian Lynagh
eb59bc04cd Kotlin: Add missing imports 2023-08-31 19:28:05 +01:00
Ian Lynagh
3009f40814 Kotlin: Opt in to org.jetbrains.kotlin.ir.symbols.IrSymbolInternals
Needed for upstream master.
2023-08-31 19:28:05 +01:00
Ian Lynagh
1ec29bffbb Kotlin: Don't use deprecated createBlockBody
The function that takes a list of statements is hidden in upstream
master.
2023-08-31 19:28:05 +01:00
Ian Lynagh
d511d46cde Kotlin: Use packageFqName rather than fqName
Upstream master says:
   error: using 'fqName: FqName' is an error. Please use `packageFqName` instead
2023-08-31 19:28:05 +01:00
Ian Lynagh
c67cc23e07 Kotlin: Write usesK2 information to the database 2023-08-22 12:37:01 +01:00
Ian Lynagh
3b9bd16097 Kotlin: Mark some functions as private 2023-08-15 12:38:47 +01:00
Ian Lynagh
a8b69e5b55 Kotlin: Fix build on old versions 2023-08-15 11:30:23 +01:00
Ian Lynagh
eb27428514 Kotlin: Handle IrExternalPackageFragment when dealing with external decls 2023-08-14 17:37:48 +01:00
Ian Lynagh
72af8ac1e2 Kotlin: Switch to useDeclarationParentOf
This lets us handle Kotlin 2 declarations whose parent is an
IrExternalPackageFragment, indicating that they are in a (multi)file
class.
2023-08-14 17:02:49 +01:00
Ian Lynagh
4f336820de Kotlin: Start handling IrExternalPackageFragment parents 2023-08-14 17:02:48 +01:00
Ian Lynagh
77451de9a3 Kotlin: Fix isExternalDeclaration for Kotlin 2 2023-08-14 15:01:13 +01:00
Ian Lynagh
58da62e244 Kotlin: Handle null parent IDs in getFunctionLabel correctly 2023-08-10 18:49:10 +01:00
Ian Lynagh
0eb6d1c76e Kotlin: useFunction might return null 2023-08-09 13:45:15 +01:00
Ian Lynagh
3e86c4c39e Kotlin: Allow extractNewExpr to return null 2023-08-07 18:59:51 +01:00
Ian Lynagh
0d97c1c54a Merge pull request #13837 from igfoo/igfoo/nullFunLabel
Kotlin: Pass on a parentId and remove some redundant braces
2023-08-07 12:19:22 +01:00
Ian Lynagh
01a512b677 Kotlin: Pass on a parentId 2023-07-28 17:46:05 +01:00
Ian Lynagh
e8f4aee1cf Kotlin: Remove some redundant braces 2023-07-28 17:02:24 +01:00
Ian Lynagh
499bd970d3 Merge pull request #13412 from igfoo/igfoo/json_escape
Kotlin: Tweak our JSON escaping
2023-07-28 11:13:51 +01:00
Ian Lynagh
fe24cc1900 Merge pull request #13718 from igfoo/igfoo/file_classes
Kotlin: Improve file class support
2023-07-12 15:42:16 +01:00
Ian Lynagh
6dedd9286c Kotlin: Record "file class" info from the compiler
We were making file classes when the parent was a file, but not when it
was a class marked as one.
2023-07-11 15:58:42 +01:00
Ian Lynagh
a603f21ce1 Kotlin: Use 1.9.0 for CI 2023-07-11 14:10:48 +01:00
Ian Lynagh
fcf003ceb5 Revert "Kotlin: Remove a use of ObsoleteDescriptorBasedAPI"
This reverts commit a50d804ad7.
2023-06-30 19:32:37 +01:00
Ian Lynagh
a50d804ad7 Kotlin: Remove a use of ObsoleteDescriptorBasedAPI
This isn't supported in Kotlin 2 mode, but removing this code doesn't
affect any tests.
2023-06-28 13:48:43 +01:00
Ian Lynagh
4adecf0d15 Merge pull request #13586 from igfoo/igfoo/diag-limit
Kotlin: Remove an out-of-date comment
2023-06-27 15:41:47 +01:00
Ian Lynagh
4415c364ac Merge pull request #13542 from igfoo/igfoo/modality_final
Kotlin: Remove an expected-no-getter exception
2023-06-27 15:41:27 +01:00
Ian Lynagh
d588f52262 Kotlin: Remove an out-of-date comment 2023-06-27 13:33:52 +01:00
Ian Lynagh
65dee80b36 Merge pull request #13547 from igfoo/igfoo/dead-code
Kotlin: Build: Remove some dead code
2023-06-26 11:50:50 +01:00
Ian Lynagh
5da377b46a Kotlin: Build: Remove some dead code 2023-06-23 13:51:35 +01:00
Ian Lynagh
0d05f50aaa Kotlin: Remove an expected-no-getter exception
We're not sure why it was necessary.
2023-06-22 18:12:13 +01:00
Ian Lynagh
bfd0a19d85 Kotlin: Define DiagnosticTrapWriter, for type safety
In some cases, we were writing diagnostics to TRAP files where they
shouldn't be written. Such TRAP files don't define #compilation, so TRAP
import gave errors.

Now we use DiagnosticTrapWriter to get the type system to check that we
are writing diagnostics to the right place.
2023-06-21 18:38:27 +01:00
Ian Lynagh
64e591a823 Merge pull request #13482 from igfoo/igfoo/conc
Kotlin: Avoid another cause of ConcurrentModificationException with 1.9
2023-06-19 12:57:25 +01:00
Ian Lynagh
ec73f28d09 Merge pull request #13479 from igfoo/igfoo/ENUM_ENTRIES
Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
2023-06-19 12:57:10 +01:00
Ian Lynagh
1f538cced3 Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
Generated by Kotlin 1.9 for some of our tests.
2023-06-19 10:36:29 +01:00
Ian Lynagh
096e9a4ba4 Kotlin: Avoid another cause of ConcurrentModificationException with 1.9 2023-06-16 17:06:54 +01:00
Ian Lynagh
b7e9915151 Merge pull request #13463 from igfoo/igfoo/AccessControlException
Kotlin: Remove use of AccessControlException
2023-06-15 10:53:28 +01:00
Ian Lynagh
0419b6e505 Kotlin: Remove use of AccessControlException
We were getting warnings about it being deprecated, and it was all dead
code anyway.
2023-06-14 17:45:58 +01:00
Ian Lynagh
36e8441ed7 Merge pull request #13427 from igfoo/igfoo/references
Kotlin: Avoid using deprecated APIs
2023-06-14 11:15:35 +01:00
Ian Lynagh
d3941ae935 Kotlin: Avoid using deprecated APIs 2023-06-09 18:14:09 +01:00
Ian Lynagh
22fe055e53 Kotlin: Tweak our JSON escaping
We were escaping '/', but I don't think there is any need to do so. It
just happens to have a nice escape in the spec. Escaping it might
filenames annoying to work with.

I've also added escaping for the other control characters that we're
meant to escape.
2023-06-08 15:20:30 +01:00
Ian Lynagh
ca63122ce4 Kotlin: Relax version requirements
If the latest version we know about is 1.9, and we are faced with 1.10,
then we try 1.9 rather than failing with an exception.
2023-06-06 14:09:55 +01:00
Ian Lynagh
82578af349 Kotlin: Use @files for compiler arguments
Avoids problems with large line lengths.
2023-05-31 19:43:45 +01:00
Ian Lynagh
0090429d53 Kotlin: Support 1.9.0 2023-05-31 19:43:45 +01:00
Ian Lynagh
202037e925 Merge pull request #13148 from igfoo/igfoo/arrays
Kotlin: Add some documentation on arrays, and tweak the tests we use for them
2023-05-12 18:52:16 +01:00
Ian Lynagh
826e87f435 Kotlin: Simplify some array tests 2023-05-12 12:54:08 +01:00
Ian Lynagh
ad51767374 Kotlin: Add comment describing Kotlin array predicates 2023-05-12 12:38:05 +01:00
Ian Lynagh
4885e584a0 Merge pull request #13042 from igfoo/igfoo/ODASA_JAVA_LAYOUT
Kotlin: Remove ODASA_JAVA_LAYOUT support
2023-05-11 18:35:08 +01:00