-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Force parallel configuration of all projects before model building #30226
base: master
Are you sure you want to change the base?
Force parallel configuration of all projects before model building #30226
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
61bf38e
to
de723b1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
93a2499
to
18a4cb6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ac2933d
to
9333e47
Compare
@bot-gradle test this without pts on linux |
I've triggered the following builds with parameters: |
9333e47
to
2523dd6
Compare
2523dd6
to
433ce83
Compare
@bot-gradle test this without pts on linux |
I've triggered the following builds with parameters: |
// TODO: isolated expected behaviour for parallel sync | ||
// server.expect("configure-root") | ||
// server.expectConcurrent("configure-a", "configure-b") | ||
server.expectConcurrent("configure-a", "configure-b") |
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 test actually works like this even on master
without changes in this PR. I am able to reproduce it locally. That is, projects a
and b
are configured concurrently.
The reason for this is related to BuildType.TASKS
not meaning "only run tasks, no models are built". Instead it means "tasks are requested, but models might as well". Another part of the story is that any IDE sync (IJ 2024.2 and IJ 2024.2.1) is identified as BuildType.TASKS
even if no tasks are involved. Instead, I observe a request for "default tasks".
@Override | ||
public void prepare(ProjectState projectState) { | ||
if (buildModelParameters.isIsolatedProjects()) { | ||
buildLifecycleController.configureProjects(); |
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.
💭 Calling this method here is actually redundant, because it is already called unconditionally on that model-building code path here.
First via this call:
Line 61 in 4e67a79
ProjectState targetProject = buildController.withProjectsConfigured(gradle -> gradle.getDefaultProject().getOwner()); |
And then via here:
Lines 70 to 71 in 4e67a79
// Force configuration of the containing build and then locate the builder for target project | |
buildController.configureProjects(); |
FYI, experimenting with this further in |
Fixes #30206