Skip to content

Commit f502af0

Browse files
committed
[rd-refactoring]
Rd version bump, model regeneration typos and small adjustments
1 parent 346c59e commit f502af0

File tree

19 files changed

+43
-48
lines changed

19 files changed

+43
-48
lines changed

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ kotlinVersion=1.7.20
2929
log4j2Version=2.13.3
3030
coroutinesVersion=1.6.3
3131
collectionsVersion=0.3.4
32+
# after updating plugin version you should manually bump corresponding versions in plugin
33+
# as they cannot be set from properties
34+
# utbot-intellij/build.gradle.kts
35+
# utbot-rd/build.gradle
36+
rdVersion=2022.3.4
3237
intellijPluginVersion=1.7.0
3338
jacocoVersion=0.8.8
3439
commonsLangVersion=3.11

utbot-framework-api/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ val junit4Version: String by rootProject
44
val sootVersion: String by rootProject
55
val commonsLangVersion: String by rootProject
66
val kotlinLoggingVersion: String? by rootProject
7+
val rdVersion: String? by rootProject
78

89
plugins {
910
id("com.github.johnrengelman.shadow") version "7.1.2"
@@ -13,8 +14,8 @@ dependencies {
1314
api(project(":utbot-core"))
1415
api(project(":utbot-api"))
1516
api(project(":utbot-rd"))
16-
implementation(group ="com.jetbrains.rd", name = "rd-framework", version = "2022.3.1")
17-
implementation(group ="com.jetbrains.rd", name = "rd-core", version = "2022.3.1")
17+
implementation(group ="com.jetbrains.rd", name = "rd-framework", version = rdVersion)
18+
implementation(group ="com.jetbrains.rd", name = "rd-core", version = rdVersion)
1819
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
1920
exclude(group="com.google.guava", module="guava")
2021
}

utbot-framework-api/src/main/kotlin/org/utbot/framework/UtSettings.kt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,7 @@ object UtSettings : AbstractSettings(
264264
DEFAULT_CONCRETE_EXECUTION_TIMEOUT_IN_INSTRUMENTED_PROCESS_MS
265265
)
266266

267-
/**
268-
* Log level for instrumented process.
269-
*/
270-
var instrumentedProcessLogLevel by getEnumProperty(LogLevel.Info)
267+
// region engine process debug
271268

272269
/**
273270
* Path to custom log4j2 configuration file for EngineProcess.
@@ -294,6 +291,9 @@ object UtSettings : AbstractSettings(
294291
*/
295292
var engineProcessDebugSuspendPolicy by getBooleanProperty(true)
296293

294+
// endregion
295+
296+
// region instrumented process debug
297297
/**
298298
* Port which will be used for debugging instrumented process
299299
*/
@@ -319,6 +319,12 @@ object UtSettings : AbstractSettings(
319319
*/
320320
var runInstrumentedProcessWithDebug by getBooleanProperty(false)
321321

322+
/**
323+
* Log level for instrumented process.
324+
*/
325+
var instrumentedProcessLogLevel by getEnumProperty(LogLevel.Info)
326+
// endregion
327+
322328
/**
323329
* Number of branch instructions using for clustering executions in the test minimization phase.
324330
*/

utbot-framework/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ dependencies {
1616
api project(':utbot-framework-api')
1717
api project(':utbot-rd')
1818

19-
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: '2022.3.1'
20-
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: '2022.3.1'
19+
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: rdVersion
20+
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: rdVersion
2121

2222
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
2323
exclude group:'com.google.guava', module:'guava'

utbot-framework/src/main/kotlin/org/utbot/framework/process/generated/EngineProcessModel.Generated.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ class EngineProcessModel private constructor(
6666
fun create(lifetime: Lifetime, protocol: IProtocol): EngineProcessModel {
6767
EngineProcessRoot.register(protocol.serializers)
6868

69-
return EngineProcessModel().apply {
70-
identify(protocol.identity, RdId.Null.mix("EngineProcessModel"))
71-
bind(lifetime, protocol, "EngineProcessModel")
72-
}
69+
return EngineProcessModel()
7370
}
7471

7572

utbot-framework/src/main/kotlin/org/utbot/framework/process/generated/RdInstrumenterAdapter.Generated.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ class RdInstrumenterAdapter private constructor(
4242
fun create(lifetime: Lifetime, protocol: IProtocol): RdInstrumenterAdapter {
4343
EngineProcessRoot.register(protocol.serializers)
4444

45-
return RdInstrumenterAdapter().apply {
46-
identify(protocol.identity, RdId.Null.mix("RdInstrumenterAdapter"))
47-
bind(lifetime, protocol, "RdInstrumenterAdapter")
48-
}
45+
return RdInstrumenterAdapter()
4946
}
5047

5148
private val __StringNullableSerializer = FrameworkMarshallers.String.nullable()

utbot-framework/src/main/kotlin/org/utbot/framework/process/generated/RdSourceFindingStrategy.Generated.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ class RdSourceFindingStrategy private constructor(
4444
fun create(lifetime: Lifetime, protocol: IProtocol): RdSourceFindingStrategy {
4545
EngineProcessRoot.register(protocol.serializers)
4646

47-
return RdSourceFindingStrategy().apply {
48-
identify(protocol.identity, RdId.Null.mix("RdSourceFindingStrategy"))
49-
bind(lifetime, protocol, "RdSourceFindingStrategy")
50-
}
47+
return RdSourceFindingStrategy()
5148
}
5249

5350
private val __StringNullableSerializer = FrameworkMarshallers.String.nullable()

utbot-instrumentation-tests/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ dependencies {
99
testImplementation configurations.fetchInstrumentationJar
1010
testImplementation project(':utbot-sample')
1111
testImplementation group: 'org.jacoco', name: 'org.jacoco.report', version: jacocoVersion
12-
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: '2022.3.1'
13-
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: '2022.3.1'
12+
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: rdVersion
13+
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: rdVersion
1414
}
1515

1616
processResources {

utbot-instrumentation/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ dependencies {
99
implementation group: 'de.javakaffee', name: 'kryo-serializers', version: kryoSerializersVersion
1010
implementation group: 'io.github.microutils', name: 'kotlin-logging', version: kotlinLoggingVersion
1111

12-
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: '2022.3.1'
13-
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: '2022.3.1'
12+
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: rdVersion
13+
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: rdVersion
1414
implementation group: 'net.java.dev.jna', name: 'jna-platform', version: '5.5.0'
1515

1616

utbot-instrumentation/src/main/kotlin/org/utbot/instrumentation/rd/InstrumentedProcess.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class InstrumentedProcess private constructor(
5151
throw InstrumentedProcessInstantDeathException()
5252
}
5353
process
54-
}.awaitSignal()
54+
}.awaitProcessReady()
5555

5656
logger.trace("rd process started")
5757

utbot-instrumentation/src/main/kotlin/org/utbot/instrumentation/rd/generated/InstrumentedProcessModel.Generated.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ class InstrumentedProcessModel private constructor(
5555
fun create(lifetime: Lifetime, protocol: IProtocol): InstrumentedProcessModel {
5656
InstrumentedProcessRoot.register(protocol.serializers)
5757

58-
return InstrumentedProcessModel().apply {
59-
identify(protocol.identity, RdId.Null.mix("InstrumentedProcessModel"))
60-
bind(lifetime, protocol, "InstrumentedProcessModel")
61-
}
58+
return InstrumentedProcessModel()
6259
}
6360

6461

utbot-intellij/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ val jsIde: String? by rootProject
1515

1616
val sootVersion: String? by rootProject
1717
val kryoVersion: String? by rootProject
18+
val rdVersion: String? by rootProject
1819
val semVer: String? by rootProject
1920
val androidStudioPath: String? by rootProject
2021

@@ -90,8 +91,8 @@ tasks {
9091
}
9192

9293
dependencies {
93-
implementation(group ="com.jetbrains.rd", name = "rd-framework", version = "2022.3.1")
94-
implementation(group ="com.jetbrains.rd", name = "rd-core", version = "2022.3.1")
94+
implementation(group ="com.jetbrains.rd", name = "rd-framework", version = rdVersion)
95+
implementation(group ="com.jetbrains.rd", name = "rd-core", version = rdVersion)
9596
implementation(group ="com.esotericsoftware.kryo", name = "kryo5", version = kryoVersion)
9697
implementation(group = "io.github.microutils", name = "kotlin-logging", version = kotlinLoggingVersion)
9798
implementation(group = "org.apache.commons", name = "commons-text", version = apacheCommonsTextVersion)

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/process/EngineProcess.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class EngineProcess private constructor(val project: Project, rdProcess: Process
145145

146146
process
147147
}
148-
rdProcess.awaitSignal()
148+
rdProcess.awaitProcessReady()
149149

150150
return EngineProcess(project, rdProcess)
151151
}

utbot-intellij/src/main/resources/log4j2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<PatternLayout pattern="%msg%n"/>
77
</Console>
88
<!-- When working as separate process - temporary log4j2.xml would be created, in which -->
9-
<!-- substring "ref=\"IdeaAppender\"" will be replaced with "ref=\"EngineProcessAppender\""-->
9+
<!-- substring `ref="IdeaAppender"` will be replaced with `ref="EngineProcessAppender"`-->
1010
<Console name="EngineProcessAppender" target="SYSTEM_OUT">
1111
<PatternLayout pattern="%d{HH:mm:ss.SSS} | %-5level | %-25c{1} | %msg%n"/>
1212
</Console>

utbot-rd/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'com.jetbrains.rdgen' version "2022.3.1"
2+
id 'com.jetbrains.rdgen' version "2022.3.4"
33
}
44

55
import com.jetbrains.rd.generator.gradle.RdGenExtension
@@ -48,14 +48,14 @@ sourceSets {
4848

4949
dependencies {
5050
implementation project(':utbot-core')
51-
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: '2022.3.1'
52-
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: '2022.3.1'
51+
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: rdVersion
52+
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: rdVersion
5353

5454
implementation group: 'io.github.microutils', name: 'kotlin-logging', version: kotlinLoggingVersion
5555

5656
processWithRdServerMockImplementation project(':utbot-rd')
5757

58-
rdgenModelsCompileClasspath group: 'com.jetbrains.rd', name: 'rd-gen', version: '2022.3.1'
58+
rdgenModelsCompileClasspath group: 'com.jetbrains.rd', name: 'rd-gen', version: rdVersion
5959
}
6060

6161
task lifetimedProcessMockJar(type: Jar) {

utbot-rd/src/main/kotlin/org/utbot/rd/ProcessWithRdServer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ interface ProcessWithRdServer : LifetimedProcess {
7979
val port: Int
8080
get() = protocol.wire.serverPort
8181

82-
suspend fun awaitSignal(): ProcessWithRdServer
82+
suspend fun awaitProcessReady(): ProcessWithRdServer
8383
}
8484

8585
private val logger = getLogger<ProcessWithRdServer>()
@@ -98,7 +98,7 @@ class ProcessWithRdServerImpl private constructor(
9898
}
9999
}
100100

101-
override suspend fun awaitSignal(): ProcessWithRdServer {
101+
override suspend fun awaitProcessReady(): ProcessWithRdServer {
102102
protocol.scheduler.pump(lifetime) {
103103
protocol.synchronizationModel
104104
}

utbot-rd/src/main/kotlin/org/utbot/rd/UtRdUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fun <TReq, TRes> IRdCall<TReq, TRes>.startBlocking(req: TReq): TRes {
2727
val call = this
2828
// We do not use RdCall.sync because it requires timeouts for execution, after which request will be stopped.
2929
// Some requests, for example test generation, might be either really long, or have their own timeouts.
30-
// To honor their timeout logic we do not use RdCall.sync.
30+
// To honour their timeout logic we do not use RdCall.sync.
3131
return runBlocking { call.startSuspending(req) }
3232
}
3333

utbot-rd/src/main/kotlin/org/utbot/rd/generated/SettingsModel.Generated.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ class SettingsModel private constructor(
4343
fun create(lifetime: Lifetime, protocol: IProtocol): SettingsModel {
4444
SettingsRoot.register(protocol.serializers)
4545

46-
return SettingsModel().apply {
47-
identify(protocol.identity, RdId.Null.mix("SettingsModel"))
48-
bind(lifetime, protocol, "SettingsModel")
49-
}
46+
return SettingsModel()
5047
}
5148

5249

utbot-rd/src/main/kotlin/org/utbot/rd/generated/SynchronizationModel.Generated.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ class SynchronizationModel private constructor(
4141
fun create(lifetime: Lifetime, protocol: IProtocol): SynchronizationModel {
4242
SynchronizationRoot.register(protocol.serializers)
4343

44-
return SynchronizationModel().apply {
45-
identify(protocol.identity, RdId.Null.mix("SynchronizationModel"))
46-
bind(lifetime, protocol, "SynchronizationModel")
47-
}
44+
return SynchronizationModel()
4845
}
4946

5047

0 commit comments

Comments
 (0)