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

Trigger HCR after compilation #5578

Merged
merged 3 commits into from
Feb 29, 2024
Merged

Conversation

iusildra
Copy link
Contributor

@iusildra iusildra commented Aug 24, 2023

Follow up of the implementation of hot code replace (HCR) in the scala-debug-adapter (link) and in the vscode extension (link). Trigger a 2nd compilation (after the first one due to saving) to ensure that HCR does not happen during compilation

@iusildra iusildra force-pushed the sync-hcr-with-compilation branch 2 times, most recently from aa2ba51 to b6a20f1 Compare August 25, 2023 12:23
@iusildra
Copy link
Contributor Author

I'll also need to synchronize the redefineClasses and setBreakpoints commands. Currently, metals send these 2 at the same second, but setBreakpoint does not wait for compilation to be finished and breakpoints might not be verified anymore, so the debugger won't stop

@adpi2
Copy link
Member

adpi2 commented Feb 29, 2024

@tgodzik This PR is ready to be reviewed and merged. It forces a compilation just before a hot code replace and it does not forward the HCR request if the compilation fails.

EDIT:

I'll also need to synchronize the redefineClasses and setBreakpoints commands. Currently, metals send these 2 at the same second, but setBreakpoint does not wait for compilation to be finished and breakpoints might not be verified anymore, so the debugger won't stop

That's not an issue anymore. The debugger takes care of reinstalling all breakpoints in source files that changed.

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for pushing this forward!

@adpi2 adpi2 merged commit f9e146f into scalameta:main Feb 29, 2024
25 of 26 checks passed
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

Successfully merging this pull request may close these issues.

3 participants