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

Best way to use Revise to iterate on REPL code #741

Open
staticfloat opened this issue Mar 30, 2023 · 1 comment
Open

Best way to use Revise to iterate on REPL code #741

staticfloat opened this issue Mar 30, 2023 · 1 comment

Comments

@staticfloat
Copy link

While trying to figure out how best to get Revise to work with the REPL, I came up with the following recipe:

using Revise
using REPL
Revise.track(REPL)

term = REPL.Terminals.TTYTerminal("dumb", stdin, stdout, stderr)
repl = REPL.LineEditREPL(term, true)
Revise.retry()

while true
    @info("Launching sub-REPL, use `^D` to reload, `exit()` to quit.")
    REPL.run_repl(repl)
    Revise.retry()
end

Is there some better way to do this? If not, perhaps it's worth documenting something like this somewhere?

@timholy
Copy link
Owner

timholy commented Sep 26, 2024

Thanks @staticfloat! See #852

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

2 participants