loadapp() not recognizing "using ..Module" #534
-
Hello, However, loadapp() does not seem to support that? Is that by design, or is it simply not worth implementing such functionality because the gains would be small? The following is for clarification: Currently I have a little app which lives within a script:
with Presentations.jl:
When trying to refactor this code into the infrastructure provided by Genie.newapp_webservice (moving the code from the script to routes.jl, of course first removing the include statement and the dot in "using .Presentations"), I run into a problem. Namely, "loadapp()" gives me the following:
I can of course still import via |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Okay, I understand my mistake now. What I did was the following: in routes.jl: using Genie.Router
using Stipple, StippleUI, StipplePlotly
using Presentations in Presentations.jl: module Presentations
using ..Stipple, ..StipplePlotly This led to the error described in the original post. My mistake was in routes.jl. Here's a version which works just as intended: using Genie.Router
using Stipple, StippleUI, StipplePlotly
include("src/Presentations.jl")
using ..Presentations This sped up compiling my code, from 90 to 45 seconds. HOWEVER, this approach has a downside in that it doesn't seem to be compatible with revise. As I documented here, I found that combining my modules into one big module and making use of @reexport turned out to be a good solution |
Beta Was this translation helpful? Give feedback.
Okay, I understand my mistake now. What I did was the following:
in routes.jl:
in Presentations.jl:
This led to the error described in the original post. My mistake was in routes.jl. Here's a version which works just as intended:
This sped up compiling my code, from 90 to 45 seconds. HOWEVER, this approach has a downside in that it doesn't seem to be compatible with revise. As I documented here, I found that combining my modules into one big modul…