Genie.jl
Genie.jl copied to clipboard
newapp_mvc should contain [compat]
With the transition of Genie 4 to 5 and the continuation of new versions I suggest to add [compat]
entries to newapp_mvc
.
I just walked through https://genieframework.com/docs/genie/tutorials/Developing-MVC-Web-Apps.html a couple of times and noticed in the end that Genie v5 was loaded in WatchTonight even though I started with
] add Genie@v4
using Genie
Genie.newapp_mvc("Watch tonight", dbadapter= :SQLite)
Though in the new folder when everything is set up Genie 5 is installed due to the missing [compat]
section.
Thanks - great point, not sure how to do it but I'll take a look.
I've did:
Pkg.add(pkgs, io = devnull)
testmode ? Pkg.develop("Genie", io = devnull) : Pkg.add(name="Genie", version="4")
testmode ? Pkg.develop("Inflector", io = devnull) : Pkg.add(name="Inflector")
inside install_app_dependencies
and
project_toml = open("Project.toml","a")
write(project_toml, "\n[compat]\n");
write(project_toml, "Genie = \"4\"\n");
Pkg.activate(".")
Pkg.instantiate()`
though it would be of course beneficial to do that a bit cleaner 😄
Good idea :) I've updated the codebase so that Genie 4 apps generate Genie 4 apps.