File tree Expand file tree Collapse file tree 1 file changed +2
-28
lines changed
Expand file tree Collapse file tree 1 file changed +2
-28
lines changed Original file line number Diff line number Diff line change @@ -106,35 +106,9 @@ function @main(args)
106106
107107 # Load the module
108108 try
109- # Try to load the module
109+ # Load the module using Base.require
110110 mod_symbol = Symbol (module_name)
111-
112- # Try to load the module using Base.require
113- mod = try
114- # First try to load it as a package in the current environment
115- Base. require (Main, mod_symbol)
116- catch
117- # If that fails, check if it's already loaded
118- if isdefined (Main, mod_symbol)
119- getfield (Main, mod_symbol)
120- else
121- # Try to include it as a local file
122- loaded = false
123- for path in [" $module_name .jl" , " src/$module_name .jl" , " ../$module_name .jl" ]
124- if isfile (path)
125- include (abspath (path))
126- loaded = true
127- break
128- end
129- end
130-
131- if loaded && isdefined (Main, mod_symbol)
132- getfield (Main, mod_symbol)
133- else
134- error (" Could not load module: $module_name " )
135- end
136- end
137- end
111+ mod = Base. require (Main, mod_symbol)
138112
139113 # Extract functions
140114 setup_fn = nothing
You can’t perform that action at this time.
0 commit comments