Fail to execute startup.jl

I have just installed Julia 1.4.1 on Windows. I have a trusty startup.jl file in C:\Users\myuser\.julia\config

I can directly execute the file, but on [re]starting Julia (CTRL+j,k) startup.jl is not executed. The doc does not suggest a new (ref the old .juliarc.jl) change in startup file convention. What did I miss…

: )

Philippe

It should be

~/.julia/config/startup.jl

See https://docs.julialang.org/en/v1/manual/getting-started/#man-getting-started-1

Thank you for taking the time. That’s actually where I have the startup file ( \. was typeset as . by this web site, see my corrected post above). Any suggestions?

Juno by default keeps a few Julia processes running to mitigate the long startup time we currently have. You can turn that feature off with the Boot Mode option (in the julia-client settings):

Even when using the Process Cycler you can kill a few (~3) processes one after the other, after which your new startup.jl should be loaded.

Thank you. I have now tried this: switched from “Cycler” to “Basic”. This is slower, as you indicate, but my startup.jl is still not executed.

I can’t repro this – just putting println("startup") into my startup file works fine.

…and I wouldn’t know how to send you a reproduceable bug report for this case. I have replaced my file with a hello world - still no execution (so it’s not due to a bug in my startup file).

Are Julia and I disagreeing on what my username is?

Juno has a Julia: Open Julia Startup File command. Can you check whether that opens the file you’re expecting it to?

Yes it does. That eliminates a disagreement on the user name. ???

It should, yes. No idea what’s going on then.
Have you accidentally set --startup-file=no in julia-client’s Additional Julia Startup Arguments?

No, nothing there. (My level is far under where I would have made such a mistake! :grinning:)

Thank you for trying! It was interesting to explore the Julia-client options, so I got something out of it…

As a more immediate solution you could also put your code into juno_startup.jl (can be opened with Julia: Open Juno Startup File) and see if that works.

No joy…

That’s really weird. Can you share the content of your startup.jl?

#Used by Julia 1.0 and beyond
using Printf
#using Revise
@printf "Executing %s\n" @__FILE__
const home  = "C:\\Users\\myuser\\Documents\\GIT\\julia"
add2path(s) = (push!(LOAD_PATH, s);@printf "Added to path   :     %s\n" s)

add2path("$home\\modules_1_0\\src")

#rm(abspath(first(DEPOT_PATH), "conda", "deps.jl"))
cd("$home\\sandbox"); @printf "Set current dir :     %s\n" pwd()
@printf "Completed %s\n\n" @__FILE__

…but again, I have replaced the code with println("startup") and it does not seem to execute, so I do not see how that could be my code…