I’m fairly new to Genie, but I created an app called “Jane” with a resource called TTIntervals:
Here is the code I’m running as part of a route:
push!(LOAD_PATH, "src/resources/ttintervals")
println("")
@show LOAD_PATH
using TTIntervals
I get a distracting and concerning warning when I load the server:
[root@jane julia]$ ./server
_____ _
| __|___ ___|_|___
| | | -_| | | -_|
|_____|___|_|_|_|___|
| Web: https://genieframework.com
| GitHub: https://github.com/genieframework/Genie.jl
| Docs: https://www.genieframework.com/docs
| Discord: https://discord.com/invite/9zyZbD6J7H
| Twitter: https://twitter.com/GenieMVC
Active env: DEV
Loading routes
LOAD_PATH = ["@", "@v#.#", "@stdlib", "/app/src/julia", "src", "app/resources", "app/resources/ttintervals"]
┌ Warning: 2022-05-21 02:23:55 Package Jane does not have TTIntervals in its dependencies:
│ - If you have Jane checked out for development and have
│ added TTIntervals 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 Jane
└ Loading TTIntervals into Jane from project dependency, future warnings for Jane are suppressed.
I also get it if I just use the repl script:
[root@jane julia]$ ./repl
[ Info: Precompiling Jane [92c6e173-99f2-4685-9b2f-3a35a387c9a0]
_____ _
| __|___ ___|_|___
| | | -_| | | -_|
|_____|___|_|_|_|___|
| Web: https://genieframework.com
| GitHub: https://github.com/genieframework/Genie.jl
| Docs: https://www.genieframework.com/docs
| Discord: https://discord.com/invite/9zyZbD6J7H
| Twitter: https://twitter.com/GenieMVC
Active env: DEV
Loading routes
LOAD_PATH = ["@", "@v#.#", "@stdlib", "/app/src/julia", "src", "app/resources", "app/resources/ttintervals"]
┌ Warning: 2022-05-21 02:55:08 Package Jane does not have TTIntervals in its dependencies:
│ - If you have Jane checked out for development and have
│ added TTIntervals 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 Jane
└ Loading TTIntervals into Jane from project dependency, future warnings for Jane are suppressed.
[ Info: 2022-05-21 02:55:09 Precompiling TTIntervals [top-level]
Ready!
If I basically do the same thing directly from the julia REPL (not genie script), I don’t get any warnings:
[root@jane julia]$ julia --project=.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.6.6 (2022-03-28)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> push!(LOAD_PATH, "src/resources/ttintervals")
4-element Vector{String}:
"@"
"@v#.#"
"@stdlib"
"src/resources/ttintervals"
julia> using TTIntervals
What’s going on? Isn’t “using Asdf” as simple as having the directory that has Asdf.jl in it in the LOAD_PATH? I read all 9 pages of the Julia Code Loading documentation and I still have no idea why these two cases are differing in behavior. It seems like something in the genie initialization process is changing the way that julia does warnings for “using”??? Please help.
Looks like others have had this issue too.