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
Ian Lynagh
712561ffa2
Kotlin: Fix recommended variable names in error messages
2023-05-11 13:02:35 +01:00
Ian Lynagh
e7d1782eea
Merge pull request #13088 from igfoo/igfoo/getTypeParameterParentLabel
...
Kotlin: Small simplification
2023-05-11 11:59:06 +01:00
Ian Lynagh
9764a8c348
Kotlin: Remove some redundant return statments
2023-05-09 16:25:59 +01:00
Ian Lynagh
24d7391f5b
Kotlin: Remove ODASA_JAVA_LAYOUT support
...
This is no longer supported, and has never been used with Kotlin.
2023-05-09 16:25:37 +01:00
Ian Lynagh
968a78e3e6
Kotlin: Small simplification
...
Merge two `IrFunction` cases into one.
2023-05-09 16:25:20 +01:00
Ian Lynagh
fcf1f6a6f9
Kotlin: Don't use distutils in build script
...
We were getting
DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
during the build.
2023-03-20 11:49:54 +00:00
Chris Smowton
3514dd1e4d
Java: merge the @class and @interface database types and tables
...
This will allow the extractor to emit class(id, ...) when all it knows about a class is its name, due to not having it available on the classpath. Previously it would have had to guess whether it belonged to @class or @interface, possibly introducing an inconsistency.
2023-02-14 17:21:23 +00:00
Ian Lynagh
6255298876
Kotlin: Use 1.8.10 for CI
...
I don't think there's any need for the CI version to be one of the
versions we build extractors for, so I've removed that check.
2023-02-08 11:35:23 +00:00
Ian Lynagh
75562e7fb5
Kotlin: Remove legacy trap-locking support
2023-01-26 16:58:51 +00:00
Ian Lynagh
17de5c120a
Kotlin: Make a couple of functions private
2023-01-16 15:29:14 +00:00
Ian Lynagh
20b35e5d02
Kotlin: 1.8.0 changes
2023-01-10 14:41:30 +00:00
Ian Lynagh
c4119761cc
Kotlin: Another 1.8 build fix
2023-01-10 14:41:30 +00:00
Ian Lynagh
89b3363761
Kotlin: Bump CI version to 1.8.0-Beta
2023-01-10 14:41:30 +00:00
Ian Lynagh
f7d8d16ed3
Kotlin: Fix build for 1.8.0-Beta
...
The build no longer works for Kotlin < 1.8: We get
error: class 'org.jetbrains.kotlin.ir.IrElement' was compiled
with an incompatible version of Kotlin. The binary version
of its metadata is 1.8.0, expected version is 1.6.0.
2023-01-10 14:41:29 +00:00
Chris Smowton
406a12e797
Remove unused function DeclarationStack.findFirst
2022-12-13 09:34:36 +00:00
Chris Smowton
dd86f7a696
Kotlin: Revert type erasure within $default functions
...
This imprecise implementation turned out to cause linkage errors, e.g. when type variables in the signatures of member methods were inappropriately erased. For the time being we accept that $default methods despite having erased signatures in keeping with their JVM representation can contain expressions whose types make reference to their
surrounding function or class' type variables, even though they should be out of scope since $default methods are static and don't have type parameters, and need to cope with the inconsistency in QL.
2022-12-12 18:33:22 +00:00
Chris Smowton
77004f3e15
Merge pull request #11258 from smowton/smowton/feature/kotlin-annotation-extraction
...
Kotlin: extract annotations
2022-12-12 09:52:49 +00:00
Chris Smowton
5282c86158
Apply review feedback
2022-12-09 18:07:14 +00:00
Ian Lynagh
1bf82cecfa
Merge pull request #11602 from igfoo/igfoo/diaglimits
...
Kotlin: Improve diagnostic limit message
2022-12-09 14:05:47 +00:00
Chris Smowton
93ea433c49
Add missing imports
2022-12-09 10:33:06 +00:00
Chris Smowton
78234c52fd
Ensure constructors don't get nullability annotations
2022-12-09 10:33:06 +00:00
Chris Smowton
f5dc5155f9
Don't introduce @NotNull on Kotlin methods that already have that annotation
...
This usually can't happen, but delegates pointing at Java appear to be synthesised with this normally-hidden annotation
2022-12-09 10:33:05 +00:00
Chris Smowton
01a5345660
Reimplement Deprecated annotation conversion suitable for older Kotlin versions
2022-12-09 10:33:05 +00:00
Chris Smowton
70ebb41d67
Restore nullability annotations
...
This is imperfect since arguments to those annotations will be missing, but at least the common case of a plain `@NotNull` or `@Nullable` will be right, and the `@NotNull`s introduced by the Kotlin compiler will be present as expected.
2022-12-09 10:33:05 +00:00
Chris Smowton
8bbb34a498
Convert kotlin.Deprecated back into a no-arg java.lang.Deprecated if applicable
...
This at least maintains consistency with the Java extractor, although we lose its arguments if any were supplied Java-side.
2022-12-09 10:33:05 +00:00
Chris Smowton
658c7a20cf
Don't extract error expressions when a default value is missing
...
This is a shortcoming of the Kotlin extractor, but at least this way we don't introduce an inconsistency if the annotation is later seen from .kt source or by the Java extractor
2022-12-09 10:33:05 +00:00
Chris Smowton
5b2834c833
Restrict type access extraction to classes extracted from source
...
Type accesses have anonymous IDs, so we mimic the Java extractor and extract them only when seeing a class in a .kt source file.
2022-12-09 10:33:05 +00:00
Chris Smowton
0a788bcbc1
Don't extract return value type accesses for external annotations
...
This would cause inconsistencies when both the source and external view of the class are in scope, since the type access has a fresh id.
2022-12-09 10:33:05 +00:00
Chris Smowton
225913c49e
Replace needless map call
2022-12-09 10:33:04 +00:00
Chris Smowton
80ef3a5290
Move meta-annotation support code out into its own class
2022-12-09 10:33:04 +00:00