Do not rely on Base.active_repl#643
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #643 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 9 11 +2
Lines 1556 1592 +36
======================================
- Misses 1556 1592 +36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aviatesk
approved these changes
May 14, 2025
aviatesk
left a comment
Member
There was a problem hiding this comment.
Thanks, confirmed this fixes the both failure modes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relying on
Base.active_replintroduced two failure modes:Cthulhu.REPL !== parentmodule(typeof(Base.active_repl)), we error.Base.active_replis not defined and we error.We used it only to retrieve a terminal, but as it turns out the setup is extremely simple so it seems we can just do that ourselves. From what I understand, it hooks into
stdout/stdin/stderr, but nothing requires interacting withBase.active_repl.This should fix #450.
Reproducing the first failure mode (and ensuring it is now fixed) is a bit tricky, these conditions seem to work for me:
~/.julia/dev).devit within the Cthulhu project.julia --project --startup-file=nothen executeusing Cthulhu; @descend exp(4).masterand pass on this PR.The second failure mode can be reproduced with #450 (comment).