Upgrading a package to v1.0 and developping


I would like to first apologize because despite reading some posts on discourse and in the docs, I am quite confused about how I should do the following:

  1. upgrade my package PDMP.jl to Julia 1.0 and register it
  2. develop it on my computer. It is located at ~/work/prog_gd/julia/dev/PDMP.jl (I named it dev during julia v0.5, it has nothing to do with my ~/.julia/dev )

My problem for 1. is that I have none of the files Project.toml… What is the easiest way to do this. It seems ] dev https://github.com/rveltz/PDMP.jl will not do it. I am not sure I should start from scratch like (v1.0) pkg> generate PDMP and add the files as I would lose the git history (eg located in ~/work/prog_gd/julia/dev/PDMP.jl).

My problem for 2. is the lack of understanding. I have a feeling that I should do ] dev PDMP once 1. is solved but I am not sure. Also, I would prefer to work in ~/work/prog_gd/julia/dev/PDMP.jl if possible.

Hopefully, I am not the only one concerned by these questions.

Thank you for your help,

1 Like
  1. You can do (v1.0) pkg> generate PDMP and copy over the Project.toml file to the already existing project. Just make sure the existing project contains this subtree
    β”œβ”€β”€ Project.toml
    └── src
        └── PDMP.jl
    At this point, your project will be a valid Pkg project. The rest of the process is more documented.
  2. To develop the project: activate it and add dependencies:
    • (v1.0) pkg> activate ~/work/prog_gd/julia/dev/PDMP.jl
    • (PDMP) pkg> add Dep1 Dep2 ...
  3. Now you can develop your project; just make sure your project stays activated. In other words: as long as the Pkg prompt is (PDMP) pkg> you will be able to do julia> import PDMP.


  1. Step 1 gets you to a valid project directory in a slightly hacky way (there is an open PR.)
  2. Pkg is based on environments. You point Pkg at the environment you want to use by using activate. You specify the packages which should be available in that environment by using add.
  3. Once you set up your environment, you can develop normally. You can load any dependency declared in your Project.toml file with using/import.
1 Like

This works: ] dev ~/work/prog_gd/julia/dev/PDMP.jl

Thank you for your detailed explanation!

β”œβ”€β”€ Project.toml └── src └── PDMP.jl

you mean:

β”œβ”€β”€ Project.toml
└── src
            └── PDMP.jl


Thank you for 1. It works for me. You did notn mention the way to register it though.

Yup, that’s what I meant. Fixed