How am I supposed to create and distribute packages in Julia 0.7/1.0 ?

I am quite confused about the package situation in Julia at the moment. I’ve worked with the previous package manager and followed to guides for how to make a package and distribute it. Like how you register it, make sure it is tagged properly, has automatic build etc.

However for the new package manager Pkg3, I can’t figure out how the process is supposed to work. The Julia documentation explains how to create your own package. But I am unable to obtain any information on how you distribute this package. I’ve looked at other packages on Github, but they all seem to use the old Pkg2 config files. I don’t see the Manifest.toml and Config.toml files e.g. in the Github repos.

I see the REQUIRE file, but isn’t that a Pkg2 thing?

Or can Pkg3 in fact use Pkg2 formatted package repositories?

1 Like

Yes, exactly. You can just keep doing exactly what you were doing before. The tooling for automatically creating project files and registering Pkg3-only packages will improve in the future, but for now you can keep listing requirements in REQUIRE and tagging releases with GitHub + AttoBot.

3 Likes

Thanks, very useful feedback. Would you mind elaborating a bit more on your typical workflow for creating a package under Julia 0.7 for distribution. Do you use the Pkg3 terminal mode to generate a package and then just manually add a REQUIRE file, or do you use the old Pkg.generate() function? And why do I not see people check in Project.toml and Manifest. toml files in addition to REQUIRE in their repositories?

I was actually not aware of AttoBot. I wish the standard Julia documentation said more about these kinds of workflows. I have relied primarily on the julia website and reading documentation there. I used PkgDev in the past. Is that not recommended anymore? Does anyone have any write up of best practices for distributing Julia packages since 0.7?

AFAIK 1.0 support is WIP: