Skip to content
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

mill.contrib.bloop.Bloop/install run very slow in some case #4469

Open
harry-xi opened this issue Feb 4, 2025 · 6 comments
Open

mill.contrib.bloop.Bloop/install run very slow in some case #4469

harry-xi opened this issue Feb 4, 2025 · 6 comments

Comments

@harry-xi
Copy link

harry-xi commented Feb 4, 2025

In project ScAllay/ScalaPluginTemplate-WithMill it always take me more then 10 minutes to run it after I change the list of dependencies (whether removing or adding). When using sbt with bloop in a project with similar dependencies, It takes less than a minute to do it. (you can find the project here)

I checked the code for this task and didn't find anything significant. But I still have a suspicion that maybe it re-downloads all the dependencies when there is any change in the dependency list.

@lefou
Copy link
Member

lefou commented Feb 5, 2025

Have you tried the Mill built-in BSP server, which is the preferred BSP server and can be installed with mill mill.bsp.BSP/install? See also https://mill-build.org/mill/cli/installation-ide.html#_ide_support

@harry-xi
Copy link
Author

harry-xi commented Feb 6, 2025

I haven't traid it. If you think a try to it can help to find out the problem,l will try it as soon as I have time (maybe a week later).
What more I'm workin on vscode, so bloop seems like my only choice.

@lefou
Copy link
Member

lefou commented Feb 6, 2025

You most likely using Metals in vscode, which connects to Mill via BSP the Build Server Protocol. It requires a BSP Server to run. Bloop is on BSP server that is independent of Mill, hence the contrib plugin needs to generate a config for it. Mill BSP is another BSP server, directly supported by Mill. Since not all concepts of Mill can be mapped easily to the Bloop config files, and the bloop contrib plugin haven't seen much contributions (e.g. it is still using a bloop-config-1.5.5), you should definitely give Mill BSP a try. It will also heloful to identify the issues you see. E.g. is Mill BSP also taking that long?

@harry-xi
Copy link
Author

You most likely using Metals in vscode, which connects to Mill via BSP the Build Server Protocol. It requires a BSP Server to run. Bloop is on BSP server that is independent of Mill, hence the contrib plugin needs to generate a config for it. Mill BSP is another BSP server, directly supported by Mill. Since not all concepts of Mill can be mapped easily to the Bloop config files, and the bloop contrib plugin haven't seen much contributions (e.g. it is still using a bloop-config-1.5.5), you should definitely give Mill BSP a try. It will also heloful to identify the issues you see. E.g. is Mill BSP also taking that long?

this problem didn't repoduce in mill bsp.

@lefou
Copy link
Member

lefou commented Feb 21, 2025

@harry-xi We just merged PR #4600, which looks like it could fix this issue. Maybe you could try that out and report back?

@lihaoyi
Copy link
Member

lihaoyi commented Feb 21, 2025

#4600 is only in main, we probably need to backport it to 0.12.x so people can use it in their existing builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants