What’s the best way to do the following:
Generate a new package to be used as a module by the end user or other packages, in some public registry. I don’t need v0.6 compatibility. It probably won’t be made public for several days or weeks. Possiblities:
- In v0.7-beta do
(v0.7) pkg> generate MyMod Generating project MyMod: MyMod/Project.toml MyMod/src/MyMod.jl
I get a uuid in the
Project.toml, which is comforting. Trying
using MyMod anywhere other than the current directory throws an error. I’m sure there is an easy way to solve this.
- In v0.6.3 do
julia> PkgDev.generate("MyMod", "MIT") Info: Initializing MyMod repo: /home/lapeyre/.julia/v0.6/MyMod Info: Origin: https://github.com/jlapeyre/MyMod.jl.git Info: Generating LICENSE.md Info: Generating README.md Info: Generating src/MyMod.jl Info: Generating test/runtests.jl Info: Generating REQUIRE Info: Generating .gitignore Info: Generating .travis.yml Info: Generating appveyor.yml Info: Generating .codecov.yml Info: Committing MyMod generated files
Look at all the useful files I get ! Then,
shell> mkdir ~/.julia/mydev shell> cp -a ~/.julia/v0.6/MyMod/ ~/.julia/mydev
Then again in v0.6
(v0.7) pkg> dev ~/.julia/mydev/MyMod ┌ Warning: packages will need to have a [Julia]Project.toml file in the future └ @ Pkg.Types Types.jl:578 [ Info: Assigning UUID 62a62a1c-8078-11e8-34fd-c32091553eb2 to MyMod Resolving package versions... Updating `~/.julia/environments/v0.7/Project.toml` [62a62a1c] + MyMod v0.0.0 [`~/.julia/mydev/MyMod`] Updating `~/.julia/environments/v0.7/Manifest.toml` [62a62a1c] + MyMod v0.0.0 [`~/.julia/mydev/MyMod`]
Entries are made in
Manifest.toml so that I can immediately do
using MyMod together with all the other packages.
Don’t worry, because it won’t be made public for a while, and things will be much more developed and clear by then. Maybe use option 2, just because I can
usingthe package immediately, use CI services, and I won’t forget where it is. Well, I will, but it will be easier to find.