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

Ability to turn off on-save compilation #278

Open
mikkka opened this issue Jun 9, 2022 · 4 comments
Open

Ability to turn off on-save compilation #278

mikkka opened this issue Jun 9, 2022 · 4 comments

Comments

@mikkka
Copy link

mikkka commented Jun 9, 2022

Is your feature request related to a problem? Please describe.

if I have big project and do refactoring, for example type moving this ends in infinite compilation turns in metals, and takes very long time. It would be great if I could do all my changes, save all files, and then request compilation.

Describe the solution you'd like

Command or option to turn off and on auto-compilation.

Describe alternatives you've considered

go to IntelliJ maybe, it can compile on demand through SBT

Additional contex

No response

Search terms

autosave, disable, compile, source, scan

@tgodzik
Copy link
Contributor

tgodzik commented Jun 10, 2022

Thanks for reporting! The compilation only occurs after you save the files, so an alternative would be to keep the changes unsaved until you are sure you want to compile them.

Getting a usability of this feature request might be a bit tricky.

@laughedelic
Copy link
Member

Would it be possible to add a command to "Disconnect from the build server" and some indicator of wher Metals is connected to a build server or not? Then the user can reconnect using an existing command.

@armanbilge
Copy link

Yes, apologies if it already exists, but I would appreciate a way to "turn off" metals sometimes.

@sjorn3
Copy link

sjorn3 commented May 2, 2024

Hey I'd appreciate this too and would like to add a motivating example.

Our codebase takes 25 minutes to compile from scratch. That's something we're working on but it probably won't get better overnight or anything and I don't think it will ever be super quick.

I have to be very careful whenever doing certain actions to try and prevent it from full recompiling, or I'm out another 25 minutes. In particular if I rebase on master and have a conflict partway through, metals will start recompiling things that would not have needed to be recompiled if the rebase had been successful, and then when the rebase is finished it has to compile it again. If I could temporarily disable the build server for the duration of a rebase, there would be significantly less compile time.

In my particular case I prefer to start the build server manually in a terminal and have metals connect to it. But if I disable that build server metals will just spin up another one. So actually a toggle to simply disable automatic build server generation would be sufficient to fix my issue.

My current solution means fully closing vscode and using some other tool to fix merge conflicts when they are sufficiently large that I start running into this issue.

Metals does have a "disconnect from build server without restarting" option, but this doesn't seem to do anything, possibly a bug?

Thanks,

Sean.

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

No branches or pull requests

5 participants