You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I am facing a worldage issue when I try to do something like this:
module A
using Requires
function__init__()
@require SQLite="0aa819cd-b072-5ff4-a722-6bc24af294d9"beginfunctiondo_something(d::SQLite.DB)
println(d)
endendendendmodule B
using Main.A
using Requires
functionconnect(cfg::Dict)
if cfg["engine"] =="sqlite"@evalusing SQLite
f = Base.invokelatest(build_sqlite, "a")
A.do_something(f)
endendfunction__init__()
@require SQLite="0aa819cd-b072-5ff4-a722-6bc24af294d9"beginfunctionbuild_sqlite(file::String)
return SQLite.DB(file)
endendendendusing Main.B
Main.B.connect(Dict("engine"=>"sqlite"))
ERROR: MethodError: no method matching build_sqlite(::String)
The applicable method may be too new: running in world age 26781, while current world is 26792.
In module B, I would like to load SQLite only if a configuration dict says so. But then module A also uses Requires to load all the SQLite related functions when is loaded. And when B tries to call a function from A, the world age issue appears.
I really don't know if I am doing what I want in the correct way. There is a workaround or a different way to do it?
Can I avoid using invokelatest every time I call a function from A?
The text was updated successfully, but these errors were encountered:
Hello! I am facing a worldage issue when I try to do something like this:
In module B, I would like to load SQLite only if a configuration dict says so. But then module A also uses Requires to load all the SQLite related functions when is loaded. And when B tries to call a function from A, the world age issue appears.
I really don't know if I am doing what I want in the correct way. There is a workaround or a different way to do it?
Can I avoid using
invokelatest
every time I call a function fromA
?The text was updated successfully, but these errors were encountered: