Skip to content

Commit 6527070

Browse files
committed
docs adjustments for formatting and grammar
1 parent 3561d6a commit 6527070

File tree

3 files changed

+45
-25
lines changed

3 files changed

+45
-25
lines changed

docs/pages/kotlinx-rpc/topics/0-4-0.topic

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,77 @@
99
</p>
1010
<chapter title="@Rpc Annotation and RemoteService Interface" id="rpc_annotation_and_remote_service_interface">
1111
<p>
12-
This version brings changes to service definitions.
13-
Prior to <code>0.4.0</code> a service was defined as following:
12+
This version brings changes to service definitions. Starting with this version, service definitions require
13+
the <code>@Rpc</code> annotation.
14+
</p>
15+
<p>
16+
Prior to <code>0.4.0</code>, a service was defined as follows:
1417
</p>
1518
<code-block lang="kotlin">
1619
interface MyService : RPC
1720
</code-block>
1821
<p>
19-
Starting from <code>0.4.0</code> new service definition is required:
22+
Starting from <code>0.4.0</code>, the new service definition should be:
2023
</p>
2124
<code-block lang="kotlin">
2225
@Rpc
2326
interface MyService
2427
</code-block>
2528
<p>
26-
This definition will be enough for the project to build, but it is not sufficient for use in IDE.
27-
All interfaces annotated with <code>@Rpc</code> are inherently <code>RemoteService</code>.
28-
This supertype is added by our compiler plugin.
29-
However, IDE can't resolve it yet, so for the code to be highlighted properly,
30-
explicit typing is required:
29+
This definition is sufficient for the project to build. However, it will not fully support IDE features,
30+
such as code highlighting.
31+
All interfaces annotated with <code>@Rpc</code> are inherently of type <code>RemoteService</code>, which is
32+
added by the compiler plugin, but IDEs won't be able to resolve it.
33+
</p>
34+
<p>
35+
To ensure proper IDE support, add explicit typing:
3136
</p>
3237
<code-block lang="kotlin">
3338
@Rpc
3439
interface MyService : RemoteService
3540
</code-block>
3641
<note>
37-
The reasoning behind this change is that Kotlin Compiler Plugin API has changed.
38-
Versions <code>2.0.0</code> and <code>2.0.10</code> allowed our plugin to resolve marker interfaces (which <code>RPC</code> was)
39-
before the code generation phase. Starting from <code>2.0.20</code> this doesn't work,
40-
and we are forced to use annotations to reliably detect RPC services.
41-
To track changes in this regard, we created an <a href="https://youtrack.jetbrains.com/issue/KT-72654">issue</a> for the compiler team.
42-
This change is not the final API design decision, and it may be changed before the stable release.
42+
<p>
43+
The reasoning behind this update is that the Kotlin Compiler Plugin API has changed.
44+
Versions <code>2.0.0</code> and <code>2.0.10</code> allowed our plugin to resolve marker interfaces (like <code>RPC</code>)
45+
before the code generation phase. Starting from version <code>2.0.20</code>, this behaviour changed,
46+
making annotations the only reliable way to detect RPC services.
47+
</p>
48+
<p>
49+
To track changes in this regard, we raised an <a href="https://youtrack.jetbrains.com/issue/KT-72654">issue</a>
50+
with the compiler team.
51+
Note that this approach is subject to change, and the final API design may be updated before the stable
52+
release.
53+
</p>
4354
</note>
4455
</chapter>
4556
<chapter title="Removal of Kotlin versions prior to 2.0" id="removal_of_kotlin_versions_prior_to_2_0">
4657
<p>
47-
We stopped publishing compiler plugin artifacts for Kotlin versions prior to 2.0.
48-
The reason for this is high maintenance cost with little to no usage.
58+
We stopped publishing compiler plugin artifacts for Kotlin versions prior to <code>2.0.0</code>.
59+
The reason being its high maintenance cost with little to no usage.
4960
We encourage the migration to Kotlin 2.0, where all stable versions are now supported.
5061
<br/>
51-
List of Kotlin versions that are currently supported: <code>2.0.0</code>, <code>2.0.10</code>, <code>2.0.20</code>, <code>2.0.21</code>
62+
</p>
63+
<p>
64+
Currently supported Kotlin versions: <code>2.0.0</code>, <code>2.0.10</code>, <code>2.0.20</code>, <code>2.0.21</code>
5265
</p>
5366
</chapter>
5467
<chapter title="Removal of org.jetbrains.kotlinx.rpc.platform Gradle plugin"
5568
id="removal_of_org_jetbrains_kotlinx_rpc_platform_gradle_plugin">
5669
<p>
57-
Gradle plugin with id <code>org.jetbrains.kotlinx.rpc.platform</code> is not being published anymore.
70+
The Gradle plugin with id <code>org.jetbrains.kotlinx.rpc.platform</code> is not being published anymore.
5871
The reason is that it's sole role was to set BOM in the project, which is now considered unnecessary.
5972
<a href="https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml">Gradle version catalogs</a>
6073
can be used instead.
6174
</p>
6275
</chapter>
6376
<chapter title="Removal of BOM from the Gradle plugin" id="removal_of_bom_from_the_gradle_plugin">
6477
<p>
65-
The Gradle plugin that is left (<code>org.jetbrains.kotlinx.rpc.plugin</code>)
66-
does not set BOM for the project anymore. Instead, manual dependency can be set:
78+
The Gradle plugin with id <code>org.jetbrains.kotlinx.rpc.plugin</code>
79+
does not set BOM for the project anymore.
80+
</p>
81+
<p>
82+
To configure BOM manually, add the following dependency:
6783
</p>
6884
<code-block lang="kotlin">
6985
dependencies {

docs/pages/kotlinx-rpc/topics/features.topic

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@
8383
</code-block>
8484
<p>Note that this API is experimental and may be removed in future releases.</p>
8585
<p>
86-
Another way of managing streams - is to do it manually.
87-
For this, <code>StreamScope</code> constructor function can be used on pair with <code>withStreamScope</code>:
86+
Another way of managing streams is to do it manually.
87+
For this, you can use the <code>StreamScope</code> constructor function together with
88+
<code>withStreamScope</code>:
8889
</p>
8990
<code-block lang="kotlin">
9091
val streamScope = StreamScope(myJob)

docs/pages/kotlinx-rpc/topics/services.topic

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
and contains a set of methods and fields
1414
that can be executed or accessed remotely.
1515
Additionally, a service always has a type of <code>RemoteService</code>,
16-
which can be specified explicitly, or assumed implicitly and added by a compiler
17-
(the latter option does not work in IDE right now, but WIP).
18-
A simple service can be declared as follows:</p>
16+
which can be specified explicitly, or assumed implicitly by the compiler.
17+
</p>
18+
<note>
19+
Note that implicit typing is currently not supported in IDEs, but is a work in progress.
20+
</note>
21+
<p>A simple service can be declared as follows:</p>
1922

2023
<code-block lang="kotlin">
2124
@Rpc

0 commit comments

Comments
 (0)