Genie Discord forum

Author Avataronoke
12/8/2023, 4:09:40 AM

I am working in upgrading my app Genie v4 to v5, but as you know it does not get go around smooth as always. The error is displayed by executing 'repl' is such like bellow. I am considering to build Genie v5 app env then copy my app to it if this migration is not easy as much. Could anyone give me any suggestion to this migration? Every advices are very appreciate. The error message is posted in this thread later, because of the length regulation in a post.

--------Environment------------ Julia v1.8.5 Genie v5.16.0

--------What I did------------ 1.activate 2.instantiate Genie@5. <- i did 'pin Genie@4' in using juliav1.7 5.comment out 'push!(...)' in bootstrap.jl repl -> got error -> resolve() -> run repl agein -> above error messages

Author Avataronoke
12/8/2023, 4:10:38 AM

OK, the msg is here

Author Avataronoke
12/8/2023, 4:13:30 AM

Ok, the message is this, 'Jetelina' is my app name. ------------Error Message----------- Loading initializersERROR: LoadError: MethodError: no method matching (::Jetelina.var"#1#3"{String})(::NamedTuple{(:level, , :_module, , , , , ), Tuple{Base.CoreLogging.LogLevel, String, Module, Symbol, Symbol, String, Int64, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}) The applicable method may be too new: running in world age 32486, while current world is 32493. Closest candidates are: (::Jetelina.var"#1#3")(::Any) at ~/Desktop/Jetelina/Jetelina/config/initializers/logging.jl:19 (method too new to be called from this world context.) Stacktrace: 1 handle_message(::LoggingExtras.TransformerLogger{LoggingExtras.TeeLogger{Tuple{LoggingExtras.MinLevelLogger{Logging.ConsoleLogger, Base.CoreLogging.LogLevel}}}, Jetelina.var"#1#3"{String}}, ::Base.CoreLogging.LogLevel, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ LoggingExtras ~/.julia/packages/LoggingExtras/5k9PW/src/CompositionalLoggers/transformer.jl:22 2 handle_message(::LoggingExtras.TransformerLogger{LoggingExtras.TeeLogger{Tuple{LoggingExtras.MinLevelLogger{Logging.ConsoleLogger, Base.CoreLogging.LogLevel}}}, Jetelina.var"#1#3"{String}}, ::Base.CoreLogging.LogLevel, ::String, ::Module, ::Symbol, ::Symbol, ::String, ::Int64) @ LoggingExtras ~/.julia/packages/LoggingExtras/5k9PW/src/CompositionalLoggers/transformer.jl:20 3 macro expansion @ ./logging.jl:365 inlined4 autoload(root_dir::String; context::Module, skipdirs::Vector{String}, namematch::Regex, skipmatch::Nothing, autoload_ignore_file::String, autoload_file::String) @ Genie.Loader ~/.julia/packages/Genie/u6bTz/src/Loader.jl:216 5 #load_initializers#5 @ ~/.julia/packages/Genie/u6bTz/src/Loader.jl:155 inlined .... continue in the next post

Author Avataronoke
12/8/2023, 4:16:44 AM

6 invokelatest(::Any; kwargs::Base.Pairs{Symbol, Module, Tuple{Symbol}, NamedTuple{(:context,), Tuple{Module}}}) @ Base ./essentials.jl:731 7 load(; context::Module) @ Genie.Loader ~/.julia/packages/Genie/u6bTz/src/Loader.jl:296 8 genie(; context::Module) @ Genie ~/.julia/packages/Genie/u6bTz/src/Genie.jl:164 9 main() @ Jetelina ~/Desktop/Jetelina/Jetelina/src/Jetelina.jl:8 10 top-level scope @ ~/Desktop/Jetelina/Jetelina/bootstrap.jl:5

That's all. πŸ™‚

Author AvatarPere
12/13/2023, 7:39:49 PM

This world age problem is something I have not encountered before. Considering your code worked with Genie v4 and not with v5...I guess it's got something to do with Genie. I'll ask @essenciary to take a look.

I also recommend that you upgrade to Julia 1.9, apps start much faster with this version

Author Avataronoke
12/13/2023, 9:55:17 PM

Thank you Pere, I am going to try to use v1.9, and report it to you later.

Author Avataronoke
12/14/2023, 1:51:20 AM

Today's error by using julia v1.9.4 is here, after 'activate -> instantiate -> pin Genie@5 -> Genie.loadapp()' with julia v1.9.4 on mac.

Loading libsβ”Œ Warning: 2023-12-14 10:44:20 Replacing docs for Jetelina.CSVFileController :: Union{} in module Jetelina.CSVFileController β”” @ Base.Docs docs/Docs.jl:243 ERROR: ArgumentError: Package Jetelina does not have JetelinaReadConfig 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 Jetelina checked out for development and have added JetelinaReadConfig 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 Jetelina Stacktrace: 1 macro expansion @ ./loading.jl:1634 inlined . .

Some *.jl are saied ' not in its dependencies', despite did 'Pkg.resoleve()'. How can I fix its dependencies?

Author AvatarPere
12/14/2023, 9:44:08 PM

where is that JetelinaReadConfig package hosted? If you have it on a github repo then you can do this from your main project:

] add https://repo-address

If it's on a local folder then do

] dev ./path/to/package

Author Avataronoke
12/18/2023, 12:27:52 AM

Did it with julia1.9, then got a message as '..has the same name or UUID as the active project'. I guess it was because of doing 'activate .' and 'instantiiate' already. It said 'dev' should be done in the path of exisiting Project.toml. Hum, I guess 'dev' would wanna to change Project.toml and Manifest.toml, it is as same as 'resolve', maybe.

Author Avataronoke
12/18/2023, 12:39:51 AM

Guessing...... Some my *.jl files have dependency each other, meanwhile developing step by step. For example, in A.jl using B in B.jl using A

It was no problem in v4, becaue each *.jl files were developed one by one, guess the dependency was tidied up. But this dependency has been broken about migrating v4 to v5 due to re-compile all at once. Is there such a thing?

Author Avataronoke
12/18/2023, 3:05:12 AM

Genie spits out this message when Jetelina is importend to a different machine. Is this related with the issue? does not support precompilation but is imported by a module that does. ......Skipping precompilation since precompile(false). Importing ... top-level.

Author AvatarPere
12/21/2023, 7:05:21 PM

What happens i you include the modules outside of a Genie app? If you're getting circular dependencies I think you should solve those before adding the modules to Genie. Also, in case you need to, you can set the module load order in Genie

Author Avataronoke
1/4/2024, 5:03:38 AM

No way, I gave up its migration, then switch to 'porting'. I have to put my jl files into Geniev5 env one by one. julia is v1.9. I am doing include() each file by resolving their dependency, it looks fine so far, but I notice 'julia -> using Genie -> Genie.loadapp() -> got erros(not found modules because of dependency) -> include() one by one ' works, then exit() -> 'bin/repl' does not work. I mean precompile cache does not store by include(). It worked in Geniev4. Whats happen? And '.autoload' file does not work.

Author Avataronoke
1/5/2024, 1:06:05 AM

And also, I am confusing in difference '.' and '..Main.' in the using description.πŸ˜΅β€πŸ’«

Author Avataronoke
1/8/2024, 1:59:26 AM

Ok, finally I have narrowed down two question in my issue. can I keep alive compiled cache? Genie5 did not keep them after exiting, despite Genie4 did. can I load jl files sequentially in real? the '.autoload' file did not work.

My trouble, migrate G4 -> G5, will resolve if 1 will be able to. 2 is B plan for giving up 1.