You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The manual for modules offers the following example code:
module NiceStuff
export nice, DOG
struct Dog end# singleton type, not exportedconst DOG =Dog() # named instance, exportednice(x) ="nice $x"# function, exportedendusing NiceStuff
But running it produces the following error:
ERROR: LoadError: ArgumentError: Package NiceStuff not found in current path:
- Run `import Pkg; Pkg.add("NiceStuff")` to install the NiceStuff package.
Stacktrace:
[1] require(into::Module, mod::Symbol)
@ Base ./loading.jl:967
in expression starting at /home/username/julia-modules/try.jl:14
In face using NiceStuff needs to be replaced with using .NiceStuff, but this is not documented anywhere. Documentation for the using and import statements just refer to the modules section of the manual.
Similarly, the description of "Package directories" in the manual section on code loading appears to be incomplete. I cannot get a julia script to import a julia module from a file in the same directory tree using any of the three locations for entry points that are provided in the manual. An example of how exactly to set up julia files that import each other as modules without building a manifest file would be very helpful.
This is related to #26910 but is not exactly the same.
The text was updated successfully, but these errors were encountered:
@fredrikekre You're right, the old docs are still live on the website and the issue is closed so my search didn't find this.
The thing remaining here is the section on code loading. I can't follow the instructions there to get "Package directories" to work at all as the docs suggest.
The manual for modules offers the following example code:
But running it produces the following error:
In face
using NiceStuff
needs to be replaced withusing .NiceStuff
, but this is not documented anywhere. Documentation for theusing
andimport
statements just refer to the modules section of the manual.Similarly, the description of "Package directories" in the manual section on code loading appears to be incomplete. I cannot get a julia script to
import
a julia module from a file in the same directory tree using any of the three locations for entry points that are provided in the manual. An example of how exactly to set up julia files that import each other as modules without building a manifest file would be very helpful.This is related to #26910 but is not exactly the same.
The text was updated successfully, but these errors were encountered: