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

Should we add Revise.jl #28

Open
Azzaare opened this issue Mar 28, 2021 · 4 comments
Open

Should we add Revise.jl #28

Azzaare opened this issue Mar 28, 2021 · 4 comments
Labels
question Further information is requested

Comments

@Azzaare
Copy link
Member

Azzaare commented Mar 28, 2021

Should we add Revise.jl to have update in the boat without restarting it, at least during the dev phase?

It might still be buggy though, but if use in sync with tmux, it should be okay. What do you all think?

@tk3369
Copy link
Member

tk3369 commented Mar 28, 2021

Actually, I couldn't get it to work even when I run it locally. It seems that Revise requires some kind of trigger. Normally I would go to the REPL and make a call to the function that I just changed but this is a running process so it's different. It would be nice if you can get it work first.

@tk3369 tk3369 added the question Further information is requested label Mar 28, 2021
@rapus95
Copy link
Member

rapus95 commented May 31, 2021

The manual trigger we need to put into a callback is Revise.revise(). We could just add !revise as a bot command. That most probably would be both, a lot easier than putting it into some Discord.jl-internal routines and at the same time less of a performance hit because we don't run it all times but only on request. We might even restrict its usage to mods. The only other point we need to take into account is that we might have to switch some ordinary function calls with invokelatest calls. Like there: timholy/Revise.jl#194

@rapus95
Copy link
Member

rapus95 commented May 31, 2021

Due to the way how the handlers are called in Discord.jl (via call operator on array/dict elements) we don't even need invokelatest. Just a Revise.revise() AFAIU

@rapus95
Copy link
Member

rapus95 commented May 31, 2021

so it might be as easy as

function commander(c::Client, m::Message, ::Val{:revise})
    Revise.revise()
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants