The implementation was keeping delayed jobs in std::set sorted
only by the scheduled execution time (in microseconds since epoch).
So two jobs submitted to a worker and having the same scheduled time
were considered equivalent by the set, and one of them got lost.
Fix this by using std::multiset instead of std::set.
Before that commit, function in coroutine implementation class was
override for both SuspendFunctionN's and FunctionN+1's invoke,
which somehow works, but breaks exporting classes with such functions.
Now it's two separate functions, as it should be normally.
^KT-49395
The previous implementation didn't log anything, including stdout,
stderr and the command line, and didn't detect non-zero exit code,
making it hard to investigate the test failures.
Depending on noPack option compiler produces file or directory.
Artifact field that contains .klib file can't use @OutputDirectory
annotation. The same applies for @OutputFile with directory.
To workaround make an artifact field internal and use two optional
fields that return either file or directory depending on noPack option.
Depending on noPack option compiler produces file or directory.
Artifact field that contains .klib file can't use @OutputDirectory
annotation. The same applies for @OutputFile with directory.
This aligns with the flag added to kotlinc in:
https://youtrack.jetbrains.com/issue/KT-40670
Hermetic builds would benefit from being able to override dependency paths or airplaneMode using this mechanism:
```
$ bin/cinterop -Xoverride-konan-properties "apple-llvm-20200714-macos-x64-essentials.default=/tmp/llvm;airplaneMode=true" -def baz.def
```
With `unitSuspendFunctionObjCExport=proper` binary option,
for Unit-returning suspend functions ObjCExport now generates
completion handlers without redundant `KotlinUnit*` result parameter.
So Swift (5.5+) can import these functions as Void-returning async
functions.
^KT-47399 Fixed
The variable generated by IrStatementBuilder.irTemporary doesn't inherit
startOffset and endOffset from the builder. In particular, as a result,
temporary variables generated for elvis operator left operand have
UNDEFINED_OFFSET.
Additionally, ProvisionalFunctionExpressionLowering copies the offsets
of a variable to lowered lambda in the variable initializer. With the
problem described above, this causes invalid debug information in
Kotlin/Native, see KT-49360.
Fix irTemporary by using builder's offsets for the variable.
^KT-49360 Fixed