Skip to content

Commit b88c971

Browse files
dependabot[bot]slisson
authored andcommitted
build(deps): bump modelixCore from 11.1.3 to 11.2.1
Bumps `modelixCore` from 11.1.3 to 11.2.1. Updates `org.modelix:model-api` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix:model-api-gen-runtime` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix:model-client` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix:modelql-core` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix:modelql-untyped` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix:modelql-html` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix:model-datastructure` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix.mps:model-adapters` from 11.1.3 to 11.2.1 - [Release notes](https://github.com/modelix/modelix.core/releases) - [Changelog](https://github.com/modelix/modelix.core/blob/main/.releaserc.json) - [Commits](modelix/modelix.core@11.1.3...11.2.1) Updates `org.modelix.model-api-gen` from 11.1.3 to 11.2.1 --- updated-dependencies: - dependency-name: org.modelix:model-api dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix:model-api-gen-runtime dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix:model-client dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix:modelql-core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix:modelql-untyped dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix:modelql-html dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix:model-datastructure dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix.mps:model-adapters dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.modelix.model-api-gen dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
1 parent 44f908d commit b88c971

File tree

10 files changed

+41
-37
lines changed

10 files changed

+41
-37
lines changed

editor-common-mps/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ kotlin {
1818
dependencies {
1919
compileOnly(kotlin("stdlib"))
2020
compileOnly(coreLibs.kotlin.coroutines.core)
21-
compileOnly(coreLibs.kotlin.coroutines.swing)
21+
compileOnly(libs.kotlin.coroutines.swing)
2222
compileOnly(coreLibs.kotlin.serialization.json)
2323

2424
api(coreLibs.ktor.server.core, excludeMPSLibraries)
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
package org.modelix.mps.editor.common
22

33
import io.ktor.server.application.Application
4-
import io.ktor.server.engine.ApplicationEngine
4+
import io.ktor.server.application.serverConfig
5+
import io.ktor.server.engine.EmbeddedServer
56
import io.ktor.server.engine.EngineConnectorBuilder
6-
import io.ktor.server.engine.applicationEngineEnvironment
7+
import io.ktor.server.engine.applicationEnvironment
78
import io.ktor.server.netty.Netty
9+
import io.ktor.server.netty.NettyApplicationEngine
810
import io.ktor.util.logging.KtorSimpleLogger
911
import kotlinx.coroutines.GlobalScope
1012

11-
fun embeddedServer(port: Int, classLoader: ClassLoader? = null, module: Application.() -> Unit): ApplicationEngine {
13+
fun embeddedServer(port: Int, classLoader: ClassLoader? = null, module: Application.() -> Unit): EmbeddedServer<NettyApplicationEngine, NettyApplicationEngine.Configuration> {
1214
val portParam = port
1315
val classLoaderParam = classLoader
1416
val moduleParam = module
15-
val environment = applicationEngineEnvironment {
17+
val environment = applicationEnvironment {
1618
if (classLoaderParam != null) this.classLoader = classLoaderParam
17-
this.parentCoroutineContext = GlobalScope.coroutineContext
1819
this.log = KtorSimpleLogger("ktor.application")
19-
this.watchPaths = emptyList()
20+
}
21+
val applicationProperties = serverConfig(environment) {
2022
this.module(moduleParam)
21-
this.connectors += EngineConnectorBuilder().also { it.port = portParam }
23+
this.parentCoroutineContext = GlobalScope.coroutineContext
24+
this.watchPaths = emptyList()
2225
}
23-
return io.ktor.server.engine.embeddedServer(factory = Netty, environment = environment, configure = {})
26+
return io.ktor.server.engine.embeddedServer(Netty, applicationProperties, configure = {
27+
this.connectors += EngineConnectorBuilder().also { it.port = portParam }
28+
})
2429
}

gradle/libs.versions.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
99
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
1010

1111
[versions]
12-
modelixCore = "11.1.3"
12+
modelixCore = "11.2.1"
1313
modelixBuildtools="1.7.4"
1414
kotlin = "2.1.0"
15+
kotlinCoroutines="1.9.0"
1516

1617
[libraries]
1718
modelix-model-api = { group = "org.modelix", name = "model-api", version.ref = "modelixCore" }
@@ -27,3 +28,4 @@ modelix-build-tools-lib = { group = "org.modelix.mps", name = "build-tools-lib",
2728
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version = "7.0.3" }
2829
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version = "2.0.16" }
2930
kotlin-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version = "0.3.8" }
31+
kotlin-coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "kotlinCoroutines" }

kernelf-editor/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ kotlin {
7272
}
7373
val jvmMain by getting {
7474
dependencies {
75-
implementation(coreLibs.kotlin.coroutines.swing)
75+
implementation(libs.kotlin.coroutines.swing)
7676
}
7777
}
7878
val jvmTest by getting {

kernelf-ssr-demo/src/main/kotlin/org/modelix/editor/ssr/demo/kernelf/Application.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.modelix.editor.ssr.demo.kernelf
22

33
import io.ktor.server.application.Application
4-
import io.ktor.server.application.call
54
import io.ktor.server.application.install
65
import io.ktor.server.response.respondText
76
import io.ktor.server.routing.get
@@ -23,7 +22,7 @@ import org.modelix.model.lazy.CLTree
2322
import org.modelix.model.lazy.ObjectStoreCache
2423
import org.modelix.model.persistent.MapBasedStore
2524
import org.modelix.model.withIncrementalComputationSupport
26-
import java.time.Duration
25+
import kotlin.time.Duration.Companion.seconds
2726

2827
fun main(args: Array<String>): Unit = io.ktor.server.netty.EngineMain.main(args)
2928

@@ -49,8 +48,8 @@ fun Application.module() {
4948
KernelfLanguages.registerAll()
5049

5150
install(WebSockets) {
52-
pingPeriod = Duration.ofSeconds(15)
53-
timeout = Duration.ofSeconds(15)
51+
pingPeriod = 15.seconds
52+
timeout = 15.seconds
5453
maxFrameSize = Long.MAX_VALUE
5554
masking = false
5655
}

mps-image-editor-server/src/main/kotlin/org/modelix/mps/editor/image/ImageEditorForMPS.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import com.intellij.openapi.components.service
99
import com.intellij.openapi.project.Project
1010
import com.intellij.openapi.startup.ProjectActivity
1111
import io.ktor.server.application.Application
12-
import io.ktor.server.application.call
1312
import io.ktor.server.application.install
14-
import io.ktor.server.engine.ApplicationEngine
13+
import io.ktor.server.engine.EmbeddedServer
1514
import io.ktor.server.engine.embeddedServer
1615
import io.ktor.server.netty.Netty
1716
import io.ktor.server.response.respond
@@ -43,8 +42,8 @@ import svg.plugin.RenderSession
4342
import svg.plugin.optBoolean
4443
import java.net.URLDecoder
4544
import java.nio.charset.StandardCharsets
46-
import java.time.Duration
4745
import java.util.Collections
46+
import kotlin.time.Duration.Companion.seconds
4847

4948
private val LOG = io.github.oshai.kotlinlogging.KotlinLogging.logger { }
5049

@@ -67,7 +66,7 @@ class ImageEditorForMPS : Disposable {
6766
fun getInstance() = ApplicationManager.getApplication().getService(ImageEditorForMPS::class.java)
6867
}
6968

70-
private var ktorServer: ApplicationEngine? = null
69+
private var ktorServer: EmbeddedServer<*, *>? = null
7170
private val projects: MutableSet<Project> = Collections.synchronizedSet(HashSet())
7271
private val commandLister = object : org.jetbrains.mps.openapi.repository.CommandListener {
7372
override fun commandFinished() {
@@ -116,8 +115,8 @@ class ImageEditorForMPS : Disposable {
116115

117116
private fun Application.initKtorServer() {
118117
install(WebSockets) {
119-
pingPeriod = Duration.ofSeconds(15)
120-
timeout = Duration.ofSeconds(15)
118+
pingPeriod = 15.seconds
119+
timeout = 15.seconds
121120
maxFrameSize = Long.MAX_VALUE
122121
masking = false
123122
}

projectional-editor-ssr-mps-languages/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.modelix.excludeMPSLibraries
12
import org.modelix.mpsHomeDir
23
import org.modelix.mpsPluginsDir
34

@@ -11,9 +12,9 @@ kotlin {
1112
}
1213

1314
dependencies {
14-
testImplementation(project(":projectional-editor-ssr-mps"))
15-
testImplementation(project(":projectional-editor"))
16-
testImplementation(libs.modelix.mps.model.adapters)
15+
testImplementation(project(":projectional-editor-ssr-mps"), excludeMPSLibraries)
16+
testImplementation(project(":projectional-editor"), excludeMPSLibraries)
17+
testImplementation(libs.modelix.mps.model.adapters, excludeMPSLibraries)
1718
}
1819

1920
intellij {

projectional-editor-ssr-mps/src/main/kotlin/org/modelix/editor/ssr/mps/ModelixSSRServerForMPS.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ import com.intellij.openapi.components.service
2020
import com.intellij.openapi.project.Project
2121
import com.intellij.openapi.startup.ProjectActivity
2222
import io.ktor.server.application.Application
23-
import io.ktor.server.application.call
2423
import io.ktor.server.application.install
25-
import io.ktor.server.engine.ApplicationEngine
24+
import io.ktor.server.engine.EmbeddedServer
2625
import io.ktor.server.html.respondHtml
2726
import io.ktor.server.http.content.staticResources
2827
import io.ktor.server.routing.get
@@ -84,8 +83,8 @@ import org.modelix.scopes.IScope
8483
import org.modelix.scopes.IScopeProvider
8584
import java.net.URLEncoder
8685
import java.nio.charset.StandardCharsets
87-
import java.time.Duration
8886
import java.util.Collections
87+
import kotlin.time.Duration.Companion.seconds
8988

9089
@Service(Service.Level.PROJECT)
9190
class ModelixSSRServerForMPSProject(private val project: Project) : Disposable {
@@ -103,7 +102,7 @@ class ModelixSSRServerForMPSProject(private val project: Project) : Disposable {
103102
class ModelixSSRServerForMPS : Disposable {
104103

105104
private var ssrServer: ModelixSSRServer? = null
106-
private var ktorServer: ApplicationEngine? = null
105+
private var ktorServer: EmbeddedServer<*, *>? = null
107106
private val projects: MutableSet<Project> = Collections.synchronizedSet(HashSet())
108107
private var mpsIntegration: EditorIntegrationForMPS? = null
109108

@@ -147,8 +146,8 @@ class ModelixSSRServerForMPS : Disposable {
147146

148147
private fun Application.initKtorServer(ssrServer: ModelixSSRServer) {
149148
install(WebSockets) {
150-
pingPeriod = Duration.ofSeconds(15)
151-
timeout = Duration.ofSeconds(15)
149+
pingPeriod = 15.seconds
150+
timeout = 15.seconds
152151
maxFrameSize = Long.MAX_VALUE
153152
masking = false
154153
}

projectional-editor/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ kotlin {
4141
}
4242
val jvmMain by getting {
4343
dependencies {
44-
implementation(coreLibs.kotlin.coroutines.swing)
44+
implementation(libs.kotlin.coroutines.swing)
4545
}
4646
}
4747
val jvmTest by getting {

react-ssr-mps/src/main/kotlin/org/modelix/react/ssr/mps/ReactSSRServerForMPS.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ import io.ktor.http.ContentType
1414
import io.ktor.http.HttpStatusCode
1515
import io.ktor.server.application.Application
1616
import io.ktor.server.application.ApplicationCall
17-
import io.ktor.server.application.call
1817
import io.ktor.server.application.install
19-
import io.ktor.server.engine.ApplicationEngine
18+
import io.ktor.server.engine.EmbeddedServer
2019
import io.ktor.server.response.respond
2120
import io.ktor.server.response.respondBytes
2221
import io.ktor.server.response.respondText
@@ -43,10 +42,10 @@ import org.modelix.react.ssr.server.ReactSSRServer
4342
import java.awt.image.BufferedImage
4443
import java.io.ByteArrayOutputStream
4544
import java.lang.reflect.Modifier
46-
import java.time.Duration
4745
import java.util.Collections
4846
import javax.imageio.ImageIO
4947
import javax.swing.Icon
48+
import kotlin.time.Duration.Companion.seconds
5049

5150
@Service(Service.Level.PROJECT)
5251
class ReactSSRServerForMPSProject(private val project: Project) : Disposable {
@@ -68,7 +67,7 @@ class ReactSSRServerForMPS : Disposable {
6867
}
6968

7069
private var ssrServer: ReactSSRServer? = null
71-
private var ktorServer: ApplicationEngine? = null
70+
private var ktorServer: EmbeddedServer<*, *>? = null
7271
private var rendererFactory: MPSRendererFactory? = null
7372
private val projects: MutableSet<Project> = Collections.synchronizedSet(HashSet())
7473
private val changeTranslator = MPSChangeTranslator()
@@ -132,8 +131,8 @@ class ReactSSRServerForMPS : Disposable {
132131

133132
private fun Application.initKtorServer(ssrServer: ReactSSRServer) {
134133
install(WebSockets) {
135-
pingPeriod = Duration.ofSeconds(15)
136-
timeout = Duration.ofSeconds(15)
134+
pingPeriod = 15.seconds
135+
timeout = 15.seconds
137136
maxFrameSize = Long.MAX_VALUE
138137
masking = false
139138
}

0 commit comments

Comments
 (0)