-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix build directory for classes from Kotlin files #1019
Conversation
7ba3710
to
68442fb
Compare
68442fb
to
2e0427a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor issues.
|
||
init { | ||
if (!isCanceled()) { | ||
checkFrameworkDependencies(dependencyPaths) | ||
|
||
logger.trace("Initializing ${this.javaClass.name} with buildDir = $buildDir, classpath = $classpath") | ||
logger.trace("Initializing ${this.javaClass.name} with buildDir = $buildDirs, classpath = $classpath") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.trace("Initializing ${this.javaClass.name} with buildDir = $buildDirs, classpath = $classpath") | |
logger.trace("Initializing ${this.javaClass.name} with buildDirs = ${buildDirs.joinToString(File.pathSeparator)}, classpath = $classpath") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed as suggested
@@ -107,7 +107,7 @@ private fun initSoot(buildDir: Path, classpath: String?, jdkInfo: JdkInfo) { | |||
+ if (!classpath.isNullOrEmpty()) File.pathSeparator + "$classpath" else "" | |||
) | |||
set_src_prec(Options.src_prec_only_class) | |||
set_process_dir(listOf("$buildDir")) | |||
set_process_dir(buildDirs.map { "$it" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_process_dir(buildDirs.map { "$it" }) | |
set_process_dir(buildDirs.map { it.toString() }) |
it avoids creating unnecessary StringBuilder
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed as suggested
@@ -19,7 +19,7 @@ import org.utbot.engine.overrides.UtOverrideMock | |||
import org.utbot.engine.overrides.collections.AbstractCollection | |||
import org.utbot.engine.overrides.collections.AssociativeArray | |||
import org.utbot.engine.overrides.collections.Collection | |||
import org.utbot.engine.overrides.collections.List | |||
import org.utbot.engine.overrides.collections.List as UtList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be confusing, because we already have UtList
. Maybe use fqn like org.utbot.engine.overrides.collections.List
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced all overrides with FQN
2e0427a
to
afd95ca
Compare
afd95ca
to
3d7829e
Compare
Description
Changed the method used to compile classes so that now Kotlin files are compiled to
build/classes/kotlin
and Java files are compiled tobuild/classes/java
(previously the latter directory was used for both). This avoids duplication with classes generated by default IDEA actions.Also, refactored some methods to support multiple build directories (important when there are both Java and Kotlin files in project).
Fixes #950
Type of Change
How Has This Been Tested?
Manual Scenario
Launched plugin on scenario from #950 and several other scenarios with Kotlin files in projects -- everything works normal.
Checklist (remove irrelevant options):
This is the author self-check list