Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

v0.8 preparations. #1762

Merged
merged 3 commits into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v0.8 (Jul 2018)
* Signleton objects are frozen after creation, and shared between threads
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

* String and primitives types are frozen by default
* Common stdlib with Kotlin/JVM and Kotlin/JS
* Implemented `kotlin.random.*` and `Collection.shuffle`
* Implemented atomic integers and atomic references
* Multiple bugfixes in compiler (coroutines, inliner)
* Support 32-bit iOS (target `ios_arm32`)
* New experimental Gradle plugin
* Support XCode 9.4.1
* Optimizations (switch by enum, memory management)

## v0.7.1 (Jun 2018)
* Bugfixes in the runtime (indexOf, GC for kotlin.Array, enum equality) and the compiler
* Fix NSBlock problem, preventing upload of binaries to the AppStore
Expand Down
17 changes: 17 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ C language header, allowing to use all public APIs available in your Kotlin/Nati
See `samples/python_extension` as an example of using such shared object to provide a bridge between Python and
Kotlin/Native.


Q: How do I create static library or an object file?

A: Use `-produce static` compiler switch, or `konanArtifacts { static('foo') {} }` in Gradle.
It will produce platform-specific static object (.a library format) and C language header, allowing to
use all public APIs available in your Kotlin/Native program from C/C++ code.


Q: How do I run Kotlin/Native behind corporate proxy?

A: As Kotlin/Native need to download platform specific toolchain, you need to specify
`-Dhttp.proxyHost=xxx -Dhttp.proxyPort=xxx` as compiler's or `gradlew` arguments,
or set it via `JAVA_OPTS` environment variable.


Q: How do I specify custom Objective-C prefix/name for my Kotlin framework?

A: Use `-module_name` compiler option or matching Gradle DSL statement, i.e.
Expand All @@ -40,3 +43,17 @@ framework("MyCustomFramework") {
extraOpts '-module_name', 'TheName'
}
```


Q: Why do I see `InvalidMutabilityException`?

A: It likely happens, because you are trying to mutate a frozen object. Object could transfer to the
frozen state either explicitly, as objects reachable from objects on which `konan.worker.freeze` is called,
or implicitly (i.e. reachable from `enum` or global singleton object - see next question).


Q: How do I make a singleton object mutable?

A: Currently, singleton objects are immutable (i.e. frozen after creation), and it's generally considered
a good practise to have global state immutable. If for some reasons you need mutable state inside such an
object, use `@konan.ThreadLocal` annotation on the object.
9 changes: 5 additions & 4 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ the following platforms:
(`-target linux`, default on Linux hosts)
* Microsoft Windows x86-64 (tested on Windows 7 and Windows 10), host and target (`-target mingw`,
default on Windows hosts)
* Apple iOS (armv7 and arm64 devices, x86 simulator), cross-compiled target (`-target ios_arm64`), hosted on macOS
* Apple iOS (armv7 and arm64 devices, x86 simulator), cross-compiled target
(`-target ios_arm32|ios_arm64|ios_x64`), hosted on macOS
* Linux arm32 hardfp, Raspberry Pi, cross-compiled target (`-target raspberrypi`), hosted on Linux
* Linux mips big endian, cross-compiled target (`-target mips`), hosted on Linux
* Linux mips little endian, cross-compiled target (`-target mipsel`), hosted on Linux
* Android arm32 and arm64 (`-target android_arm32` and `-target android_arm64`) target, hosted on Linux or macOS
* Linux MIPS big endian, cross-compiled target (`-target mips`), hosted on Linux
* Linux MIPS little endian, cross-compiled target (`-target mipsel`), hosted on Linux
* Android arm32 and arm64 (`-target android_arm32|android_arm64`) target, hosted on Linux or macOS
* WebAssembly (`-target wasm32`) target, hosted on Linux, Windows or macOS

Adding support for other target platforms shouldn't be too hard, if LLVM support is available.
Expand Down