Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
35 changes: 27 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ on:
- '.github/workflows/**'
workflow_dispatch:
inputs:
version:
description: 'Version of library that is being documented'
build_id:
description: 'Id of TeamCity build that produced the Dokka artifact.'
required: true
dry_run:
type: boolean
description: "Dry run. If set to true, the action will not actually publish the pages, but will assemble the artifact."
default: true
required: true

permissions:
id-token: write
pages: write
contents: read

env:
INSTANCE: 'kotlinx-rpc/rpc'
Expand Down Expand Up @@ -90,10 +96,23 @@ jobs:
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d ${{ env.ASSEMBLE_DIR }}

- name: Download Dokka
uses: actions/download-artifact@v4
with:
name: dokka-${{ inputs.version }}
path: ${{ env.DOKKA_ARTIFACT }}
run: |
if [ -z "${{ inputs.build_id }}" ]; then
echo "'build_id' is not set"
exit 1
fi

echo "Downloading Dokka artifact, build id: ${{ inputs.build_id }}"

artifact_url="https://krpc.teamcity.com/app/rest/builds/id:${{ inputs.build_id }}/artifacts/content/${{ env.DOKKA_ARTIFACT }}"
echo "Downloading Dokka artifact from URL: $artifact_url"

curl -v -s -f -L -H "Authorization: Bearer ${{ secrets.TEAMCITY_TOKEN }}" "$artifact_url" -o "${{ env.DOKKA_ARTIFACT }}"

if [ -z "$(ls | grep -x ${{ env.DOKKA_ARTIFACT }})" ]; then
echo "Failed to download Dokka artifact, asset id: ${{ inputs.build_id }}"
exit 1
fi

- name: Unzip Dokka
run: unzip -O UTF-8 -qq '${{ env.DOKKA_ARTIFACT }}' -d ${{ env.ASSEMBLE_DIR }}/api
Expand All @@ -110,7 +129,7 @@ jobs:
retention-days: 7

deploy:
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && !inputs.dry_run
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down Expand Up @@ -138,7 +157,7 @@ jobs:
uses: actions/deploy-pages@v4

publish-indexes:
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && !inputs.dry_run
needs: [ build, test, assemble, deploy ]
runs-on: ubuntu-latest
container:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/dokka.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

@file:Suppress("FunctionName")
Expand Down Expand Up @@ -44,17 +44,10 @@ interface VersionSpecificApi {
origin: IrDeclarationOrigin = this.origin,
): IrValueParameter

fun IrSimpleFunction.addExtensionReceiverVS(
type: IrType,
origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED,
): IrValueParameter

var IrFieldBuilder.isFinalVS: Boolean

var IrCall.originVS: IrStatementOrigin?

var IrConstructor.isPrimaryVS: Boolean

val IrConstructor.parametersVS: List<IrValueParameter>

val IrConstructorCall.argumentsVS: List<IrExpression?>
Expand Down Expand Up @@ -91,7 +84,6 @@ interface VersionSpecificApi {
): IrConstructorCallImpl

fun IrFunction.valueParametersVS(): List<IrValueParameter>
val IrFunction.extensionReceiverParameterVS: IrValueParameter?
var IrFunction.dispatchReceiverParameterVS: IrValueParameter?

fun IrMemberAccessExpressionData.buildFor(access: IrMemberAccessExpression<*>)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.rpc.codegen.extension
Expand All @@ -19,7 +19,6 @@ import org.jetbrains.kotlin.ir.types.SimpleTypeNullability
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
import org.jetbrains.kotlin.ir.util.dump
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.Variance
import java.util.*

Expand Down Expand Up @@ -76,16 +75,10 @@ inline fun IrProperty.addBackingFieldUtil(builder: IrFieldBuilder.() -> Unit = {
}
}

// originally appeared as 'NameUtils.propertyDelegateName'
fun propertyDelegateName(propertyName: Name): Name {
return Name.identifier("${propertyName.asString()}\$delegate")
}

inline fun <T, R> Collection<T>.memoryOptimizedMap(transform: (T) -> R): List<R> {
return mapTo(ArrayList<R>(size), transform).compactIfPossible()
}


inline fun <T, R> Collection<T>.memoryOptimizedMapIndexed(transform: (index: Int, T) -> R): List<R> {
return mapIndexedTo(ArrayList<R>(size), transform).compactIfPossible()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.rpc.codegen.extension
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.rpc.codegen.extension
Expand Down

This file was deleted.

This file was deleted.

Loading