Genie.jl icon indicating copy to clipboard operation
Genie.jl copied to clipboard

newapp_mvc should contain [compat]

Open Wikunia opened this issue 1 year ago • 2 comments

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.

Wikunia avatar Aug 07 '22 13:08 Wikunia

Thanks - great point, not sure how to do it but I'll take a look.

essenciary avatar Aug 08 '22 09:08 essenciary

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 😄

Wikunia avatar Aug 08 '22 14:08 Wikunia

Good idea :) I've updated the codebase so that Genie 4 apps generate Genie 4 apps.

essenciary avatar Aug 10 '22 19:08 essenciary