I wrote this simple tool for generating a
Project.toml to make your Julia package compliant with the new
Just load up this module (put the file in your
LOAD_PATH and do
using GenProject, head over to the directory of the project you want to generate files for (i.e. make it your
pwd) and do
genproject(). This will initialize and
Manifest.toml from the packages listed in your
REQUIRE and download the dependencies into the new
Pkg directories if they aren’t there already.
By default this will fetch the latest tagged version of all the packages in your
REQUIRE. I thought this was a good default behavior because we are in an upgrading frenzy, and in most cases you’ll need to do this to get things up and running on 0.7 anyway. If however you want the minimum versions listed in
REQUIRE you can do
genproject(use_latest=false), but warning! it’s possible that the packages without version tags in
REQUIRE will conflict with requirements of older packages that you provided tags for. Undoubtedly there is a way of making sure this always gets resolved using the new
Pkg, but I haven’t done that (thus the qualification “quick and dirty”). (It’s highly likely you’ll just need latest versions anway, so I’m not sure this will ever matter).
Another thing missing from this is that it does not download any of the git metadata that ideally would go in the
Project.toml (e.g. project description, authors), but you shouldn’t need that to get your package working.
If you find something else missing that you really need, feel free to improve on this and post your own!