How can I use a package (mine) as a sub Package

I know that i can use a package code to build up on. but i did not how i can do that without copying.

The question isn’t too clear but as far as I understand you want to use a module inside another one.

You can either define the module in a file and include that file using include(filename) then run using modulename. But you will have to make sure both files are in the same directory.

Or you could do PkgDev.generate(packagename, license) to make a folder for your package in the .julia\v0.6 directory then copy your source code to .julia\v0.6\packagename\src making sure the main file is named “packagename.jl”. Then you call using packagename from any other file, REPL session or notebook session, and the package will be available to you.

You can find more details on both of these methods in the docs.

I am not sure if that’s what you were asking about but it seems more of a Usage question than a Development one. Development is more about the Julia internals and language design.

Moved it (I still don’t understand the question though).

1 Like