Genie Discord forum

Author Avatarsdobber
3/4/2023, 4:14:48 PM

I would like to create a migration that defines basic roles and permissions using GenieAuthorisation, however even the simplest setup

module DefineRolesAndPermissions

using GenieAuthorisation

function up()

end

function down()

end

end

fails when calling SearchLight.Migrations.last_up(), with the error message

โ”Œ Error: 2023-03-04 17:08:47 Failed executing migration DefineRolesAndPermissions up
โ”” @ SearchLight.Migration ~/.julia/packages/SearchLight/Ps2Js/src/Migration.jl:307
ERROR: ArgumentError: Package SearchLight does not have GenieAuthorisation in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have SearchLight checked out for development and have
  added GenieAuthorisation as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with SearchLight
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1167 [inlined]
 [2] macro expansion
   @ ./lock.jl:223 [inlined]
 [3] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144
 [4] include
   @ ./Base.jl:419 [inlined]
 [5] run_migration(migration::SearchLight.Migration.DatabaseMigration, direction::Symbol; force::Bool, context::Module)
   @ SearchLight.Migration ~/.julia/packages/SearchLight/Ps2Js/src/Migration.jl:292
 [6] #last_up#11
   @ ~/.julia/packages/SearchLight/Ps2Js/src/Migration.jl:161 [inlined]
 [7] last_up()
   @ SearchLight.Migration ~/.julia/packages/SearchLight/Ps2Js/src/Migration.jl:160
 [8] top-level scope
   @ REPL[3]:1

Am I overlooking something on my end, or is that an issue with SearchLight or GenieAutorisation?

Author Avatarabhimanyuaryan
3/5/2023, 7:48:51 AM

have you tried using GenieAuthorisation outside of Migrations? I haven't touch the package for a long time

Author Avatarsdobber
3/5/2023, 8:12:21 AM

Outside migrations, it loads the normal way without an error