-
Notifications
You must be signed in to change notification settings - Fork 25
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
can't use revise #166
Comments
this seems to be a bug due to a specific command printing, how do you reproduce this error? I'm not able to debug anything without knowing how to trigger this |
This should trigger it import Pkg
Pkg.add("Revise")
using Revise
Pkg.add("Comonicon")
using TOML
cfg = TOML.parsefile("Project.toml")
cfg["name"] = "ComTest"
open("Project.toml", "w") do f
TOML.print(f, cfg)
end
mkpath("src/")
write("src/ComTest.jl", "module ComTest print(:hello) end")
using ComTest
Revise.revise(ComTest)
write("src/ComTest.jl", """
module ComTest
using Comonicon
@cast function one()
print(:one)
end
@main
end
""")
Revise.revise()
write("src/ComTest.jl", "module ComTest print(:hello) end")
Revise.revise()
write("src/ComTest.jl", """
module ComTest
using Comonicon
@cast function one()
print(:one)
end
@main
end
""")
Revise.revise()
write("src/ComTest.jl", "module ComTest print(:hello) end")
Revise.revise()
write("src/ComTest.jl", """
module ComTest
using Comonicon
@cast function one()
print(:one)
end
@main
end
""")
Revise.revise() |
This is because Revise doesn't delete the old global I don't have a good way to fix this as Comonicon is really doing what is legit for Julia, but like |
Is it possible just detect Revise in macro if exists do nothing? Just like commented out code. |
I'm not sure because the macro in principle will be evaluated at precompile time thus when you load Revise after this I'm not sure how would this happen. But won't it be strange if the macro does nothing just because you load Revise? |
I'm running into this issue too - I've discovered that I can have the Is there a recommended development workflow documented somewhere? As in, I don't have the full thing spec'd out and I'm working out my interfaces on the fly... Even with 1.9 the restart-latency every time I want to change something is really bogging me down. |
I don't have a good solution to this, what I usually do is not define the CLI and converge on the Julia API of the package first, then add But I do hope there can be a solution to this, I believe if there is some kind of mechanism to tell Revise it can delete and allocate a new global variable with a callback it should be possible to integrate, I asked in Revise issue but no one answers me... perhaps people are busy and not much attention is attract here, given this is a small UX thing. |
I am getting this error if I try to use revise with comonicon:
The text was updated successfully, but these errors were encountered: