I’ve recently moved from c++ and python to julia as the perfect one stop shop for all my simulation needs. One thing I struggled with for quite a bit and seems others do as well is the concept of packages and projects.
There seems to be a bit of contradictory information in the Pkg documentation which states a package must have a Project.toml file which defines a name, uuid and deps. However a package can also be defined implicitly from it’s structure as stated in the julia docs i.e. X/src/X.jl
defines a package with no Project.toml. So I suppose my question is should these docs be edited to be a bit more consistent with each other or I could easily be missing something. I’m happy to help out with docs but it’s probably better left to someone not asking beginner questions.
Another related question I have, is it necessary that the name field in a in Project.toml match the package name i.e.
MyPackage/
Project.toml:
name = "MyPackage"
uuid = ...
[deps]
...
...
src/MyPackage.jl:
module MyPackage
...
end
because this tripped me up for a while and I am unable to import MyPackage when I activate the environment with name = OtherName
. I was unable to find anywhere stating that project name must match the package name. Thanks for your help