Genie Discord forum

Hi all,
Autoreload works great when updating my code, except if I make a change that results in an error. When that happens, autoreload uses a previous version of my code. It does not recognize corrections/changes made thereafter. This is really frustrating because I need to restart Julia in order fix autoreload.
Is there a way around this or a place where I can file an issue?

Can you share the output in the REPL when you encounter this? Sometimes this happen because Revise.jl (the package that reloads file changes) is unable to apply the changes. In that case, Revise will show a debug message

@itsdfish for some reason I assumed you were using Genie Builder. If you are working with just a Julia REPL and want want changes to automatically reload, use Revise and includet instead of include:
using Revise includet("app.jl")

@Pere, thanks for your reply. I have experienced the issue with the Builder and at the REPL. For some reason, I am unable to get your solution to work. It doesn't recognize any changes, even after refreshing the page.
For some reason, I cannot reproduce the problem. I feel like Genie is gaslighting me 😆 , but I suppose it could be user error. I will report back if I can reproduce the problem. It might be that certain only types of errors lead to the problem.

Ok. Here is the problem: I cannot consistently produce the same results. Sometimes it works, sometimes nothing updates, other times it works until I introduce a bug... still other times, the page completely crashes and becomes unresponsive to changes in the code. Each time I try with a fresh Jullia session.

I guess the way to reproduce the behavior is to break the code with bugs (such as removing commas) and fixing the bugs until it stops working as expected.

Here is the code I was using
app.jl
using GenieFramework
using Distributions
@genietools
@handlers begin
@in mu = 0.0
@in sigma = 1.0
@out pdf_plot = PlotData()
@out layout = PlotLayout(
xaxis = [PlotLayoutAxis(xy= "x", title = "x")],
yaxis = [PlotLayoutAxis(xy = "y", title = "density")])
@onchange isready, mu, sigma begin
println("hi")
dist = Normal(mu, sigma)
q1,q99 = quantile(dist, [.001, .999])
x = [range(-5, q1, length=5)...,
range(q1, q99, length=100)...,
range(q99, 5, length=5)...]
y = pdf.(dist, x)
pdf_plot = PlotData(; x, y, mode="lines")
end
end
@page("/", "app.jl.html")
Server.isrunning() || Server.up()
app.jl.html
<h1>Default content</h1>
<div class="row">
<div class="col col-6 col-sm">
<p> mu {{mu}}</p>
<q-slider :min="-5" :step="-.1" v-model="mu" :max="5"></q-slider>
</div>
<div class="col col-6 col-sm">
<p> sigma {{sigma}}</p>
<q-slider :min="0" :max="5" :step=".1" v-model="sigma"></q-slider>
</div>
</div>
<div class="row">
<div class="col col-12 col-sm">
<p>awesome plot<br /></p>
<plotly :data="pdf_plot" :layout="layout"></plotly>
</div>
</div>

Sorry I cannot provide a reproducible result, but that seems to be the nature of the problem.

Is this when you update julia code or .jl.html
code that reload/revise stops working?