Skip to content

Improved communication contracts in utbot-spring-analyzer #2164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sofurihafe
Copy link
Member

Description

This PR improves communication in utbot-spring-analyzer by getting rid of unused arguments and changing types.

Fixes #2160

How to test

Automated tests

Manual tests

Not relevant.

@sofurihafe sofurihafe added ctg-enhancement New feature, improvement or change request comp-rd Issue is related RD comp-spring Issue is related to Spring projects support labels Apr 19, 2023
@sofurihafe sofurihafe force-pushed the andrey-t/spring_get_rid_of_classpath branch from bab65b1 to 4dac71c Compare April 19, 2023 10:03
@EgorkaKulikov
Copy link
Collaborator

Failing CI shows that manual tests are nevertheless relevant...

@sofurihafe sofurihafe force-pushed the andrey-t/spring_get_rid_of_classpath branch from 4dac71c to 3b11eb1 Compare April 19, 2023 15:47
@sofurihafe sofurihafe force-pushed the andrey-t/spring_get_rid_of_classpath branch from 3b11eb1 to de620a0 Compare April 19, 2023 15:53
Comment on lines -101 to 106
val extendedClasspath = listOf(requiredSpringAnalyzerJarPath) + classpathItems

val requiredSpringAnalyzerJarPath = findRequiredSpringAnalyzerJarPath()
val rdProcess = startUtProcessWithRdServer(lifetime) { port ->
classpathArgs = listOf(
"-cp",
"\"${extendedClasspath.joinToString(File.pathSeparator)}\"",
"\"$requiredSpringAnalyzerJarPath\"",
"org.utbot.spring.process.SpringAnalyzerProcessMainKt"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still want to continue using classpathItems here, so spring-analyzer process is started with user's classpath. Meaning that we want to pass user's classpath all the way up to here via UtTestsDialogProcessor -> EngineProcess -EngineProcessModel -> EngineProcessMain, but we don't want it to go any further via SpringAnalyzerProcess -> SpringAnalyzerProcessModel -> SpringAnalyzerProcessMain.

Since this pull request is only changing contracts, it should not change the behavior, so you can't change command line arguments that are used to start the process.

@EgorkaKulikov
Copy link
Collaborator

Replaced with #2174

@sofurihafe sofurihafe deleted the andrey-t/spring_get_rid_of_classpath branch May 5, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-rd Issue is related RD comp-spring Issue is related to Spring projects support ctg-enhancement New feature, improvement or change request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve process communication model for utbot-spring-analyzer
3 participants