-
Notifications
You must be signed in to change notification settings - Fork 37
Modularization of the project #744
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
Conversation
trace-recorder/src/main/org/jetbrains/kotlinx/lincheck/traceagent/TraceAgent.kt
Outdated
Show resolved
Hide resolved
common/src/main/org/jetbrains/kotlinx/lincheck/util/TraceModes.kt
Outdated
Show resolved
Hide resolved
Try using friend-paths/associate-source-sets in order to handle the visibility of the classes inside |
e215518
to
d3e0b1e
Compare
common/src/main/org/jetbrains/kotlinx/lincheck/trace/CodeLocations.kt
Outdated
Show resolved
Hide resolved
common/src/main/org/jetbrains/kotlinx/lincheck/util/AnalysisSections.kt
Outdated
Show resolved
Hide resolved
common/src/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ShadowStack.kt
Outdated
Show resolved
Hide resolved
common/src/main/org/jetbrains/kotlinx/lincheck/util/AnalysisSections.kt
Outdated
Show resolved
Hide resolved
trace/src/main/org/jetbrains/lincheck/trace/TraceRecorderTracePoints.kt
Outdated
Show resolved
Hide resolved
trace-debugger/src/main/org/jetbrains/kotlinx/lincheck/trace/debugger/TraceDebuggerAgent.kt
Outdated
Show resolved
Hide resolved
trace-recorder/src/main/org/jetbrains/kotlinx/lincheck/trace/recorder/TraceRecorderAgent.kt
Outdated
Show resolved
Hide resolved
build.gradle.kts
Outdated
@@ -96,7 +136,9 @@ sourceSets { | |||
val atomicfuVersion: String by project | |||
|
|||
compileOnly(project(":bootstrap")) | |||
api(project(":trace")) | |||
api(project(":common")) // TODO: contains some classes from public lincheck API, refactor so that it does not expose essentially internal classes |
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.
Right now :common
subproject has one class that should be available to the users of lincheck, which is enum class LogLevel
. However, the rest of the symbols in it, are implementation-only. There are 2 options how to deal with that:
- [Currently used] make all symbols in
:common
internal (except forLogLevel
) and include in the root project the subproject viaapi(project(":common"))
. The problem here is that it is done via friend paths, which lack support in intellij idea, which then marks all usages oninternal
classes from:common
reads and does not provide completion and auto-importing - Create separate "common" modules, one called
:api
, which will containLogLevel
(and probably other classes in the future, the second one:common
with all classes marked aspublic
. Now, the root project will include them as follows:api(project(":api")); implementation(":common")
, which allows users to accessLogLevel
enum and disallows all classes from:common
. It also supports proper highlighting and auto-imports as regular.
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.
For now, let's just make public
everything that need to be public to work properly both in gradle and IDEA.
Please create a YT issue to set-up internal
isolation visibility properly. It is not critical right now, but would be good to fix before next Lincheck release.
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.
For now, let's just make public everything that need to be public to work properly both in gradle and IDEA.
Or use any other solution that would make code work (both in gradle and IDEA) right now, without further design/implementation.
…rate subprojects and dependencies)
…cts, because these functions are called from root project for all subprojects
…jvm-agent subproject
…ng and completion
377a794
to
057d8bd
Compare
…in favor of `implementation(...)`
TODOs:
bootstrap.jar
, classes from the modules that:core
depends on, etc.)