Genie.jl
Genie.jl copied to clipboard
Fix guides of `newapp` (confusing in v5)
I was following the guides in https://genieframework.com/docs/genie/tutorials/Developing-Web-Services.html. However, I cannot find newapp
family of function in Genie@v5
. They does not exist in the source code of Genie, either:
In the end, I found that newapp
might be migrated to Genie.Generator
(https://github.com/GenieFramework/Genie.jl/pull/519) and found them there in. It would be better to mention such changes in the tutorial.
julia> Genie.newapp
ERROR: UndefVarError: newapp not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:31
[2] top-level scope
@ REPL[16]:1
julia> Genie.
Assets Loader Secrets ispayload
BAD_REQUEST Logger Server isrunning
BOOTSTRAP_FILE_NAME NOT_FOUND Toolbox linkto
CREATED NO_CONTENT Util loadapp
Commands OK Watch params
Configuration OPTIONS WebChannels params!
Cookie PATCH WebThreads parsequerystring
Cookies POST assets_config post
DELETE PUT bootstrap query
Encryption ROUTES_FILE_NAME channel request
Exceptions Renderer channels responsetype
FileTemplates Renderers config route
GET Repl down routes
Generator Request down! run
HEAD Requests escapeHTML serve_static_file
HTTPUtils Response eval tolink
Headers Responses genie toroute
HttpCommon Router go up
INTERNAL_ERROR SEARCHLIGHT_INITIALIZER_FILE_NAME headers
Input STATUS_CODES include
julia> Genie.Generator.newapp
newapp (generic function with 1 method)
Additional context
(server) pkg> st
Status `D:\JuliaAstroSim\NonlinearOptics.jl\server\Project.toml`
[c43c736e] Genie v5.1.1
julia> versioninfo()
Julia Version 1.8.0-rc3
Commit 33f19bcbd2 (2022-07-13 19:10 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 16 × AMD Ryzen 7 3700X 8-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
Threads: 1 on 16 virtual cores
Environment:
JULIA_DEPOT_PATH = D:\.julia
Found the instructions in the doc: https://genieframework.github.io/Genie.jl/dev/guides/Migrating_from_v4_to_v5.html#.-Genie.new-family-of-functions
I think that v5 should be metioned in the tutorials, because new users are installing v5 by default: https://genieframework.com/docs/genie/tutorials
@islent I understand, but those are the guides for Genie 4 and are correct for that version of Genie. The docs now include links to both versions of Genie, see here https://genieframework.com/docs/. How did you get to that page?
I think we need to improve the docs to make it visible on each page the version (and if it's not the docs for the latest version).
How did you get to that page?
From a chrome bookmark added a couple of months ago :D
I think we need to improve the docs to make it visible on each page the version (and if it's not the docs for the latest version).
Yes, that is a solution!