Skip to content

Commit 409652b

Browse files
committed
Merge branch 'main' of github.com:Kotlin/kotlinx-rpc into issue-226
# Conflicts: # krpc/krpc-server/src/commonMain/kotlin/kotlinx/rpc/krpc/server/KrpcServer.kt
2 parents 2a12d33 + 14a7e4f commit 409652b

File tree

536 files changed

+19210
-15732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

536 files changed

+19210
-15732
lines changed

.github/workflows/changelog.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Verify Docs Changelog
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
verify-platforms-table:
11+
name: Run Verification
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Sources
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Gradle
20+
uses: gradle/actions/setup-gradle@v4
21+
22+
- name: Check Platforms Table
23+
run: ./gradlew updateDocsChangelog --info --stacktrace
24+
25+
- name: Check if changelog is up-to-date
26+
run: |
27+
if [[ -n "$(git status --porcelain | grep docs/pages/kotlinx-rpc/topics/changelog.md)" ]]; then
28+
echo "Changelog is not up to date. Please run './gradlew updateDocsChangelog' and commit changes"
29+
exit 1
30+
fi

.github/workflows/docs.yml

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@ on:
66
- 'docs/pages/**'
77
- '.github/workflows/**'
88
workflow_dispatch:
9+
inputs:
10+
build_id:
11+
description: 'Id of TeamCity build that produced the Dokka artifact.'
12+
required: true
13+
dry_run:
14+
type: boolean
15+
description: "Dry run. If set to true, the action will not actually publish the pages, but will assemble the artifact."
16+
default: true
17+
required: true
918

1019
permissions:
1120
id-token: write
1221
pages: write
22+
contents: read
1323

1424
env:
1525
INSTANCE: 'kotlinx-rpc/rpc'
@@ -20,7 +30,10 @@ env:
2030
ALGOLIA_INDEX_NAME: 'prod_kotlin_rpc'
2131
ALGOLIA_KEY: '${{ secrets.ALGOLIA_KEY }}'
2232
CONFIG_JSON_PRODUCT: 'kotlinx-rpc'
23-
CONFIG_JSON_VERSION: '0.5.1'
33+
CONFIG_JSON_VERSION: '0.8.0'
34+
DOKKA_ARTIFACT: 'dokka.zip'
35+
ASSEMBLE_DIR: '__docs_assembled'
36+
ASSEMBLE_ARTIFACT: 'assembled.zip'
2437

2538
jobs:
2639
build:
@@ -64,45 +77,96 @@ jobs:
6477
with:
6578
instance: ${{ env.INSTANCE }}
6679

67-
deploy:
80+
assemble:
6881
if: github.event_name == 'workflow_dispatch'
82+
needs: [ build, test ]
83+
runs-on: ubuntu-latest
84+
steps:
85+
- name: Checkout repository
86+
uses: actions/checkout@v4
87+
with:
88+
fetch-depth: 0
89+
90+
- name: Download Writerside artifacts
91+
uses: actions/download-artifact@v4
92+
with:
93+
name: kotlinx-rpc
94+
95+
- name: Unzip Writerside artifacts
96+
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d ${{ env.ASSEMBLE_DIR }}
97+
98+
- name: Download Dokka
99+
run: |
100+
if [ -z "${{ inputs.build_id }}" ]; then
101+
echo "'build_id' is not set"
102+
exit 1
103+
fi
104+
105+
echo "Downloading Dokka artifact, build id: ${{ inputs.build_id }}"
106+
107+
artifact_url="https://krpc.teamcity.com/app/rest/builds/id:${{ inputs.build_id }}/artifacts/content/${{ env.DOKKA_ARTIFACT }}"
108+
echo "Downloading Dokka artifact from URL: $artifact_url"
109+
110+
curl -v -s -f -L -H "Authorization: Bearer ${{ secrets.TEAMCITY_TOKEN }}" "$artifact_url" -o "${{ env.DOKKA_ARTIFACT }}"
111+
112+
if [ -z "$(ls | grep -x ${{ env.DOKKA_ARTIFACT }})" ]; then
113+
echo "Failed to download Dokka artifact, asset id: ${{ inputs.build_id }}"
114+
exit 1
115+
fi
116+
117+
- name: Unzip Dokka
118+
run: unzip -O UTF-8 -qq '${{ env.DOKKA_ARTIFACT }}' -d ${{ env.ASSEMBLE_DIR }}/api
119+
120+
- name: Update sitemap.xml
121+
run: chmod +x updateSitemap.sh && ./updateSitemap.sh ${{ env.ASSEMBLE_DIR }}/sitemap.xml ${{ env.ASSEMBLE_DIR }}/api
122+
123+
- name: Save assembled artifact
124+
uses: actions/upload-artifact@v4
125+
with:
126+
name: kotlinx-rpc-assembled
127+
path: |
128+
${{ env.ASSEMBLE_DIR }}
129+
retention-days: 7
130+
131+
deploy:
132+
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && !inputs.dry_run
69133
environment:
70134
name: github-pages
71135
url: ${{ steps.deployment.outputs.page_url }}
72-
needs: [ build, test ]
136+
needs: [ build, test, assemble ]
73137
runs-on: ubuntu-latest
74138
steps:
75139
- name: Download artifacts
76140
uses: actions/download-artifact@v4
77141
with:
78-
name: kotlinx-rpc
142+
name: kotlinx-rpc-assembled
79143

80144
- name: Unzip artifact
81-
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d dir
145+
run: unzip -O UTF-8 -qq '${{ env.ASSEMBLE_ARTIFACT }}' -d ${{ env.ASSEMBLE_DIR }}
82146

83147
- name: Setup Pages
84148
uses: actions/configure-pages@v5
85149

86150
- name: Package and upload Pages artifact
87151
uses: actions/upload-pages-artifact@v3
88152
with:
89-
path: dir
153+
path: ${{ env.ASSEMBLE_DIR }}
90154

91155
- name: Deploy to GitHub Pages
92156
id: deployment
93157
uses: actions/deploy-pages@v4
94158

95159
publish-indexes:
96-
if: github.event_name == 'workflow_dispatch'
97-
needs: [ build, test, deploy ]
160+
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && !inputs.dry_run
161+
needs: [ build, test, assemble, deploy ]
98162
runs-on: ubuntu-latest
99163
container:
100164
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3
101165
steps:
102166
- name: Download artifact
103167
uses: actions/download-artifact@v4
104168
with:
105-
name: kotlinx-rpc
169+
name: kotlinx-rpc-assembled
106170
- name: Unzip artifact
107171
run: |
108172
unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes

.github/workflows/platforms.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Verify Platforms Table
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
verify-platforms-table:
11+
name: Run Verification
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Sources
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Setup Gradle
19+
uses: gradle/actions/setup-gradle@v4
20+
- name: Check Platforms Table
21+
run: ./gradlew verifyPlatformTable --no-configuration-cache --info --stacktrace

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ lib-kotlin
1919
!.idea/icon.svg
2020
!.idea/detekt.xml
2121
!.idea/kotlinTestDataPluginTestDataPaths.xml
22+
!.idea/kotlinx-rpc.iml
2223

2324
samples/**/.idea/*
2425

.idea/kotlinx-rpc.iml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.puppeteerrc.cjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
/*
2+
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
15
const {join} = require('path');
26

3-
const isCI = process.env.TEAMCITY_VERSION
7+
const isTC = process.env.TEAMCITY_VERSION;
8+
const isGA = process.env.GITHUB_ACTIONS;
49

5-
if (isCI) {
10+
if (isTC !== undefined || isGA !== undefined) {
611
/**
712
* @type {import("puppeteer").Configuration}
813
*/

CHANGELOG.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,118 @@
1+
# 0.8.0
2+
> Published 30 June 2025
3+
4+
## Overview
5+
This release brings a lot of changes, including breaking changes:
6+
- Kotlin 2.2.0 Update
7+
- Decoupling of `kotlinx.serialization` from the core functionality
8+
- Simplifying lifetime schema (services lost their `CoroutineScope`)
9+
- Irreversible enforcement of the [strict mode](https://kotlin.github.io/kotlinx-rpc/strict-mode.html)
10+
11+
These changes significantly reduce the number of footguns and improve the overall usability of the library.
12+
13+
Additionally, the internal structure of kRPC protocol and our compiler plugin reduced its complexity.
14+
That allows us to provide better quality in future releases
15+
(and this also applies to gRPC, even though in this particular release it was not a priority).
16+
17+
For the full list of changes that require migration,
18+
see the [Migration Guide](https://kotlin.github.io/kotlinx-rpc/0-8-0.html).
19+
20+
## Docs update
21+
22+
We added three new documentation sections:
23+
- [API Reference](https://kotlin.github.io/kotlinx-rpc/api/index.html)
24+
- [Platform compatibility overview](https://kotlin.github.io/kotlinx-rpc/platforms.html)
25+
- [Changelog](https://kotlin.github.io/kotlinx-rpc/changelog.html) in the web
26+
27+
### Features 🎉
28+
* Serialization decoupling by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/354
29+
* Update Kotlin to 2.2.0 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/359
30+
31+
### Breaking Changes 🔴
32+
* [Meta] Strict mode, deprecations, lifetime by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/353
33+
34+
### Bug fixes 🐛
35+
* Fix compilation for standalone k2 module by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/350
36+
* Fix Pupperteer Version by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/355
37+
38+
### Documentation 📗
39+
* Platforms Table and docs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/356
40+
* Dokka by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/357
41+
* Add Changelog.md to Docs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/358
42+
* Onboarding by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/363
43+
44+
### Other Changes 🧹
45+
* Advance version to 0.8.0-SNAPSHOT by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/340
46+
* Update README.md to use non-suspend flows by @brokenhappy in https://github.com/Kotlin/kotlinx-rpc/pull/342
47+
* Fix kotlin master builds by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/345
48+
* Simplify Gradle Configs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/360
49+
50+
## New Contributors
51+
* @brokenhappy made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/342
52+
53+
**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.7.0...0.8.0
54+
55+
# 0.7.0
56+
> Published 13 May 2025
57+
58+
## Announcement
59+
This release enforces ERROR as a default reporting level for APIs that are forbidden by the strict mode.
60+
You can still change the level manually, but in `0.8.0` strict mode will be enforced irreversibly.
61+
62+
### Breaking Changes 🔴
63+
* Change strict mode to level ERROR by default by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/338
64+
65+
### Other Changes 🧹
66+
* Update Kotlin to 2.1.21 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/337
67+
* Version 0.7.0-SNAPSHOT by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/325
68+
* Samples: version 0.6.2 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/326
69+
* 2.2.0 compiler migration by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/335
70+
71+
**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.6.2...0.7.0
72+
73+
# 0.6.2
74+
> Published 17 April 2025
75+
76+
### Bug fixes 🐛
77+
* Fix flows that emit Units by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/323
78+
79+
**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.6.1...0.6.2
80+
81+
# 0.6.1
82+
> Published 11 April 2025
83+
84+
### Bug fixes 🐛
85+
* Fix bidirectional flows in non-suspend streams by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/316
86+
* Fix KRPC-173 (#315) by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/317
87+
88+
**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.6.0...0.6.1
89+
90+
# 0.6.0
91+
> Published 4 April 2025
92+
93+
### Features 🎉
94+
* 2.1.20 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/309
95+
* Non suspend flow by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/299
96+
97+
### Documentation 📗
98+
* Update gRPC Docs and Sample by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/284
99+
100+
### Infra 🚧
101+
* Update monitior by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/282
102+
* Fix build config for for-ide builds by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/287
103+
* Update build for custom KC versions by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/293
104+
* Fix kotlin master compilation by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/306
105+
106+
### Other Changes 🧹
107+
* Upgrade Gradle to 8.12.1 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/286
108+
* Version 0.6.0-SNAPSHOT by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/283
109+
* Update leftover sources from jvm-only to kmp by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/300
110+
* KRPC-129 Move compatibility tests from Toolbox to Kotlin RPC repo by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/304
111+
* Dependency bump by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/303
112+
* Better compiler error message for checked annotations by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/302
113+
114+
**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.5.1...0.6.0
115+
1116
# 0.5.1
2117
> Published 12 February 2025
3118

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ on how to work with the project.
8484

8585
Contributions are made using Github [pull requests](https://help.github.com/en/articles/about-pull-requests):
8686

87-
[//]: # (TODO change repo link to the repo)
8887
1. Fork the `kotlinx.rpc` repository and work on your fork.
8988
2. [Create](https://github.com/kotlin/kotlinx-rpc/compare) a new PR with a request to merge to the **main** branch.
9089
3. Ensure that the description is clear and refers to an existing ticket/bug if applicable.

0 commit comments

Comments
 (0)