Look as though I have encountered a bizarre Kotlin...
# kotlin-native
n
Look as though I have encountered a bizarre Kotlin Native compiler bug that has been driving me up the wall 🐛. Been developing a program that uses Ktor Client, and Ktor Client Serialization. When running the program using the
<http://xxxxxx>:xxxx
parameter, both the release and debug binaries work normally, and return this result:
Copy code
Response:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="robots" content="noindex,nofollow">
        <title>Prometheus Time Series Collection and Processing Server</title>

...
When the
--list-labels <http://xxxxxx>:xxxx
program parameters are used instead the debug binary works fine, however the release binary exhibits some strange behaviour where no labels are printed. The release binary should be outputting something similar to the debug binary:
Copy code
Total Labels: 48
* __name__
* address
* battery
* branch
* broadcast
* call
* cell
* chip
* chip_name

...
The release binary file size looks too good to be true at 3580 KB, while the debug binary file size by comparison is 10192 KB.
👀 1
a
Just FYI: everything works correctly if you specify your data class like:
Copy code
data class LabelsResponse(val status: String, val data: ArrayList<String>)
Nevertheless, we’re still looking for the root cause of this behavior.
👍 1
o
n
Will the fix be included in Kotlin 1.3.70?
o
Yes