Skip to content

Cannot setup any db backend other than sqllite #75

Description

@ctbaum

Describe the bug
In brand new project with only Genie added Genie.Generator.newapp_mvc(<...>) fails to precompile any backend other than SQLite

Error stacktrace

[ Info: Precompiling SearchLightPostgreSQL [4327cdd6-4902-11ea-0272-430cea0431bd]
ERROR: LoadError: SystemError: opening file "/Users/ctl/.julia/packages/LibPQ/Uh9Bl/deps/deps.jl": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base ./error.jl:176
  [2] #systemerror#82
    @ ./error.jl:175 [inlined]
  [3] systemerror
    @ ./error.jl:175 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
    @ Base ./iostream.jl:293
  [5] open
    @ ./iostream.jl:275 [inlined]
  [6] open(f::Base.var"#418#419"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./io.jl:393
  [7] open
    @ ./io.jl:392 [inlined]
  [8] read
    @ ./io.jl:473 [inlined]
  [9] _include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./loading.jl:1959
 [10] include(mod::Module, _path::String)
    @ Base ./Base.jl:457
 [11] include(x::String)
    @ LibPQ.libpq_c ~/.julia/packages/LibPQ/Uh9Bl/src/LibPQ.jl:46
 [12] top-level scope
    @ ~/.julia/packages/LibPQ/Uh9Bl/src/LibPQ.jl:49
 [13] include
    @ ./Base.jl:457 [inlined]
 [14] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2049
 [15] top-level scope
    @ stdin:3
in expression starting at /Users/ctl/.julia/packages/LibPQ/Uh9Bl/src/LibPQ.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile LibPQ [194296ae-ab2e-5f79-8cd4-7183a0a5a0d1] to "/Users/ctl/.julia/compiled/v1.9/LibPQ/jl_bP7Bpv".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2300
  [3] compilecache
    @ ./loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
  [6] macro expansion
    @ ./loading.jl:1648 [inlined]
  [7] macro expansion
    @ ./lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
  [9] include
    @ ./Base.jl:457 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2049
 [11] top-level scope
    @ stdin:3
in expression starting at /Users/ctl/.julia/packages/SearchLightPostgreSQL/8KdWH/src/SearchLightPostgreSQL.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile SearchLightPostgreSQL [4327cdd6-4902-11ea-0272-430cea0431bd] to "/Users/ctl/.julia/compiled/v1.9/SearchLightPostgreSQL/jl_qLuZuK".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2300
  [3] compilecache
    @ ./loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
  [6] macro expansion
    @ ./loading.jl:1648 [inlined]
  [7] macro expansion
    @ ./lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
  [9] eval
    @ ./boot.jl:370 [inlined]
 [10] autoconfdb(dbadapter::String)
    @ Genie.Generator ~/.julia/packages/Genie/dOqOT/src/Generator.jl:856
 [11] loadapp(path::String; autostart::Bool, dbadapter::String, context::Module)
    @ Genie ~/.julia/packages/Genie/dOqOT/src/Genie.jl:100
 [12] loadapp
    @ ~/.julia/packages/Genie/dOqOT/src/Genie.jl:95 [inlined]
 [13] autostart_app(path::String; autostart::Bool, initdb::Bool, dbadapter::String)
    @ Genie.Generator ~/.julia/packages/Genie/dOqOT/src/Generator.jl:656
 [14] post_create(app_name::String, app_path::String; autostart::Bool, testmode::Bool, dbsupport::Bool, dbadapter::String, interactive::Bool)
    @ Genie.Generator ~/.julia/packages/Genie/dOqOT/src/Generator.jl:768
 [15] post_create
    @ ~/.julia/packages/Genie/dOqOT/src/Generator.jl:755 [inlined]
 [16] newapp(app_name::String; autostart::Bool, fullstack::Bool, dbsupport::Bool, mvcsupport::Bool, testmode::Bool, dbadapter::Nothing, interactive::Bool)
    @ Genie.Generator ~/.julia/packages/Genie/dOqOT/src/Generator.jl:748
 [17] newapp
    @ ~/.julia/packages/Genie/dOqOT/src/Generator.jl:720 [inlined]
 [18] #newapp_mvc#47
    @ ~/.julia/packages/Genie/dOqOT/src/Generator.jl:830 [inlined]
 [19] newapp_mvc(name::String)
    @ Genie.Generator ~/.julia/packages/Genie/dOqOT/src/Generator.jl:828
 [20] top-level scope
    @ REPL[4]:1

To reproduce
Created new directory, cd'ed into it, fired up Julia, ] add Genie, using Genie, Genie.Generator.newapp_mvc(<...>)

Expected behavior
Setup PostgreSQL and/or MySQL backend support

Additional context
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 12 × Apple M2 Max
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
Threads: 1 on 8 virtual cores
and
pkg> st

Status `~/webdev/myapp/MyApp/Project.toml`
  [c43c736e] Genie v5.19.0
  [6d011eab] Inflector v1.1.0
  [340e8cb6] SearchLight v2.10.0
  [4327cdd6] SearchLightPostgreSQL v2.3.3
  [ade2ca70] Dates
  [56ddb016] Logging

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions