Skip to content

Shift sourceset population out of buildInitialize #135

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

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

Arthurm1
Copy link
Contributor

@Arthurm1 Arthurm1 commented Apr 4, 2024

Metals (BSP client) expects a prompt response to build/initialize and if it doesn't get one within 30 seconds it assumes the build server has not started correctly and so attempts to restart it.

Large projects take longer than this because the sourceset population takes a long time.

This shifts the population of sourcesets away from build/initialize and into workspace/buildTargets

It also shifts the responsibility of handling workspace/reload away from LifecycleService and into BuildTargetService. The LifecycleService code was similar to that RefetchBuildTargetTask so this allows doing away with RefetchBuildTargetTask and also means that any call to workspace/reload will cause a buildTarget/didChange event if the workspace has changed - which wasn't the case before.

Copy link
Member

@jdneo jdneo left a comment

Choose a reason for hiding this comment

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

LGTM! I think this is the correct way to move forward. initialization should be as fast as possible.

@Arthurm1 could you please resolve the conflicts? Then I'll merge it.

@Arthurm1 Arthurm1 force-pushed the delay_sourceset_retrieval branch from 2ee41fa to 3181d79 Compare April 12, 2024 10:58
@Arthurm1
Copy link
Contributor Author

@jdneo rebased

@jdneo jdneo merged commit e9decb4 into microsoft:develop Apr 23, 2024
@jdneo
Copy link
Member

jdneo commented Apr 23, 2024

Thank you @Arthurm1

@jdneo jdneo added the engineering Engineering tasks like refactoring, build infra, etc... label Apr 23, 2024
@jdneo jdneo added this to the 0.2.0 milestone Apr 23, 2024
@Arthurm1 Arthurm1 deleted the delay_sourceset_retrieval branch April 25, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Engineering tasks like refactoring, build infra, etc...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants