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

Ensure compilation is run with a compilation lock #8395

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

hubertp
Copy link
Contributor

@hubertp hubertp commented Nov 27, 2023

Pull Request Description

Evaluating visualization expression may trigger a full compilation. A change in #7042 went a bit too far and led to a situation when there could be compilations running at the same time leading to a rather obscure RedefinedMethodException when the compilation on one thread already finished. This will make the logic correct again at the price of potentially slowing the processing of visualization.

Closes #8296.

Important Notes

Should make visualizations a bit more stable as well.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

Evaluating visualization expression may trigger a full compilation.
A change in #7042 went a bit too far and led to a situation when there
could be compilations running at the same time leading to a rather
obscure `RedefinedMethodException` when the compilation on one thread
already finished. This will make the logic correct again at the price of
potentially slowing the processing of visualization.
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

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

Maybe you could add calls like assert
ctx.locking.assertWriteCompilationLock()
around the code base to make sure the places that need the lock, really have it.

@hubertp hubertp added CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge labels Nov 27, 2023
@mergify mergify bot merged commit 0402e8b into develop Nov 27, 2023
30 of 34 checks passed
@mergify mergify bot deleted the wip/hubert/8296-compilation-without-lock branch November 27, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RedefinedMethodException when evaluating visualization argument
2 participants