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
Split some daemon projects out of launcher
and core
#29074
Conversation
- `daemon-protocol` contains the types sent between client and daemon. - `client-services` contains some services used by the client. - `daemon-services` contains some services used by the daemon to interact with the client. In this commit, only the services related to user input and client stdin handling have been moved.
_ * event.convert("def") >> Either.left(12) | ||
Specification._ * event.convert("def") >> Either.left(12) |
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 looks like an unintentional change.
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.
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.
api(project(":base-services")) | ||
api(project(":logging-api")) | ||
api(project(":serialization")) | ||
api(project(":core")) |
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.
Would be nice if we could avoid this dependency here. Since one of the stated goals of this PR is to allow different buckets of code to target different JVM versions, and since this code is used by the launcher, I think we should avoid pulling in core if possible.
Do you know which code in project requires classes from core?
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.
Pretty much all of the client projects, such as "launcher", pull in "core". For this PR I just want to get the buckets in place without detangling from core. This can happen in a later PR.
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.
I've added some comments.
@@ -50,6 +51,8 @@ dependencies { | |||
implementation(project(":file-watching")) | |||
implementation(project(":problems-api")) | |||
implementation(project(":problems")) | |||
implementation(project(":client-services")) | |||
implementation(project(":daemon-services")) |
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.
Seems odd to have this dependency here unless we plan to remove it in future iterations -- in which case I think it would be a good idea to note that here
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.
"launcher" still needs to be split up. It currently contains the client, daemon and tooling API provider. In this PR, I just want to get the buckets in place. Detangling launcher can happen in a later PR.
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.
I've added some comments
@@ -123,6 +123,7 @@ private ClassPath plusExtensionModules(ClassPath classpath, Set<Module> extensio | |||
}; | |||
|
|||
private static final String[] GRADLE_OPTIONAL_EXTENSION_MODULES = { | |||
"gradle-daemon-services", |
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.
Why are these marked optional?
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.
That's the magic incantation to make all of the tests pass. This PR is just about getting the buckets into place. We can solve all the weird problems in the various tests later.
🎉 |
Context
Introduce 3 projects to contain the daemon client, daemon-side services and shared protocol types. The intention is to move types out of
launcher
andcore
into these buckets, however in this PR only the types related to client stdin and user input handling have been moved.The separation allows the different buckets of code to have different dependency graphs and target JVMs.
Contributor Checklist
<subproject>/src/integTest
) to verify changes from a user perspective.<subproject>/src/test
) to verify logic../gradlew sanityCheck
../gradlew <changed-subproject>:quickTest
.Reviewing cheatsheet
Before merging the PR, comments starting with