I’m trying to better understand code loading, so reading that section of the manual. The manual describes package directory environments:
A package directory is a directory containing the source trees of a set of packages as subdirectories, and forms an implicit environment. If
X is a subdirectory of a package directory and
X/src/X.jl exists, then the package
X is available in the package directory environment and
X/src/X.jl is the source file by which it is loaded.
So, I create a package
]generate SharedPackage. After doing so, my directory structure looks like so:
evan$ pwd /Users/evan/jltest evan$ ls -R SharedPackage ./SharedPackage: Manifest.toml Project.toml src ./SharedPackage/src: SharedPackage.jl
In particular, it seems like
jltest is a package directory: it contains the source tree of a package
SharedPackage. In particular
SharedPackage/src/SharedPackage.jl exists, as described in the manual snippet above. But I can’t load
shell> pwd /Users/evan/jltest (v1.1) pkg> activate . julia> using SharedPackage ERROR: ArgumentError: Package SharedPackage not found in current path: - Run `import Pkg; Pkg.add("SharedPackage")` to install the SharedPackage package. Stacktrace:  require(::Module, ::Symbol) at ./loading.jl:823
The manual as quoted above seems to be saying that from the
SharedPackage is available. But it’s not - why not? Is this not how package directory environments work / am I misreading the manual?