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

Add a shortcut for interrupting the program #3967

Merged
merged 6 commits into from
Dec 12, 2022

Conversation

4e6
Copy link
Contributor

@4e6 4e6 commented Dec 9, 2022

Pull Request Description

Add shortcuts for interrupting and restarting the program execution.

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

@4e6 4e6 self-assigned this Dec 9, 2022
Comment on lines +301 to +306
fn restart(&self) -> BoxFuture<FallibleResult> {
async move {
self.language_server.client.recompute(&self.id).await?;
Ok(())
}
.boxed_local()
Copy link
Member

Choose a reason for hiding this comment

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

  1. is restarting automatically interrupting?
  2. Is interrupting pausing until its restarted? It should.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes and yes

@4e6 4e6 marked this pull request as ready for review December 12, 2022 16:33
@4e6 4e6 added the CI: Ready to merge This PR is eligible for automatic merge label Dec 12, 2022
Copy link
Contributor

@farmaazon farmaazon left a comment

Choose a reason for hiding this comment

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

Please apply my comment before merging.

/// Execution Context handle, its call stack top contains `graph`'s definition.
execution_ctx: model::ExecutionContext,
pub execution_ctx: model::ExecutionContext,
Copy link
Contributor

Choose a reason for hiding this comment

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

This field was private for a reason: otherwise, someone could manually push a frame there without changing the graph field, which should always point to the definition on top of the frame.

Please, make it private and add interrupt and restart methods to this handle.

@4e6 4e6 removed the CI: Ready to merge This PR is eligible for automatic merge label Dec 12, 2022
@4e6 4e6 added the CI: Ready to merge This PR is eligible for automatic merge label Dec 12, 2022
@mergify mergify bot merged commit 9572791 into develop Dec 12, 2022
@mergify mergify bot deleted the wip/db/ide-interrupt-shortcut branch December 12, 2022 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants