-
Notifications
You must be signed in to change notification settings - Fork 202
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
Reload analysis files when they change #1091
Comments
Thanks for filing this ticket! Let me get back to this in a few days when I have more bandwidth and we can discuss implementing something like this. Also, if you're building some solution in this space, I suggest you open-source it, it'd be great to have this capability available for folks already using Bloop in their company. |
@Alexey-NM Have you made progress writing a solution for semi-remote compilation on your own? |
Currently we are waiting for more stable work of bsp in idea(for exalmpe SCL-16239) |
I have tried to continue working on remote compilation, I created a prototype project on github. Could you answer? I do not know whether it will be enough just to replace analysis. Is it posbile to avoid duplication of classes in bloop-internal-classes and bloop-bsp-clients-classes. |
Hey @Alexey-NM, sorry for my late reply. Have you read #1197 ? I need to add this information to the docs website and I will do that shortly. I'm already working on several important changes there. That link will give you valuable information to get bloop working remotely. Feel free to ask more questions here. |
Thank you, I plan to finish prototype in near time then I will prepare questions and desirable features.
I see the main concept. We have a large project currently it has 600 mega bytes of class files in out folder( it is folder for IntelliJ-BSP) and plus that I has more than 1 giga bytes in ".bloop" folders. Every reboot of bloop(restart computer) always copy all class files in another folder, the class files can leak. Such gready treatment with disk scares. |
I have created the prototype of utility to save\restore compilation state. Could you answer:
|
I need the ability to flush bloop state to disk and lock it until it is saved\restored. It would be good to have the ability to get current "analysisContents.getMiniSetup.output().getSingleOutput" without full loading of analysis for restoring. |
Hi @Alexey-NM, I'm glad you're looking into this. I have some reservations about how you're planning to implement remoting. Let me leave you my thoughts. The bloop state should only be managed by bloop, it is transactional and it defines the core of bloop. The bloop state is defined by all of the output files written to disk and all of the in-memory state. No other tool should use or spy on the bloop state to do X or Y because that can compromise the internal state and it relies on implementation details that certainly will change. If you need to save the bloop state, I suggest we have a discussion about what exactly you need and we look for ways we can merge that inside bloop itself. But depending on zinc to read analysis files and stamps and using the output files to introspect and manage the bloop state is an approach meant to fail and I'm afraid it's not the way to go.
Re class files, copying 1.3 GB of files is nowadays negligible. Bloop has been run in larger codebases than yours without a problem. A normal SSD has a speed of ~1GB/s and keep in mind that the copying is done in parallel. Optimizing the copying of class files is not something on the table for now. In the future, that might change but right now there are other priorities. If you're actively looking for a way you can run bloop remotely, I suggest we schedule a video conference to chat over the potential approaches and rethink what features should go where and how. That will allow me to advise you about the best way forward and hopefully will speed you up. What do you think? |
I want to echo @Alexey-NM's concern with classfile copying. I would also love to have an option to disable it. In our case, we would be willing to accept the risks by disabling this behavior. |
Disabling class file copying is just not possible at all. It can be optimized. If it becomes a priority I'm happy to start a discussion around it, but I think there are more pressing things to do atm. |
I agree it is a very broad term.
This experiment is based on: Are there any other alternatives to prevent bloop from full recompilation of a project? |
I agree disabling classfile copying is not a priority. I was just adding an experience report that we have encountered difficult-to-reproduce problems with this feature when compiling large codebases. We can discuss it separately if it becomes a blocking issue. |
I agree that it would be better to leave it as internals to decrease dependency. |
It seems it has been mistake to estimate overall size, actually it is much important to consider the amount of files because file opening is a bottleneck, at list in some desctops. |
It will be very useful to have the ability to refresh bloop without restarting.
Would it be possible to add a bloop command for that purpose, it could be something like 'refresh project'
It is very important for large project to have the ability reuse CI compilation cache.
jvican has writen:
any tool that wants remote compilation can implement it outside of bloop
Unfrotunatly if we replace analysis files the bloop server just will not be able to see changes, We have to stop\start bloop server manually. It is very inconvenient.
The text was updated successfully, but these errors were encountered: