Unable to use PkgDev with Julia 0.7.0-DEV

I wanted to give Julia version 0.7 a try and update a package I developed as required. I got stuck rather quickly.

#=
Downloaded and installed Julia 0.7
   Version 0.7.0-DEV.4690 (2018-03-23 22:25 UTC)
   Commit 78c7d87369* (3 days old master)
   x86_64-w64-mingw32
=#
# Julia console:
julia> Pkg.add("PkgDev")
julia> using PkgDev
ERROR: LoadError: LoadError: ArgumentError: Module Main not found in current path.
ERROR: Failed to precompile PkgDev to C:\Users\Owner\.julia\compiled\v0.7\PkgDev.ji.

Any suggestions?

The package manager for Julia 0.7 will be the current Pkg3 and not the future renamed Pkg2 which is the package manager for Julia 0.6. The API will be very similar, but the underlying structure is very different. For now the best resource would be the latest documentation, following Pkg3 Plan and Status Discourse post, the stdlib repository or reaching out to the main author @StefanKarpinski. PkgDev functionalities seem to be included in the package manager as it was before PkgDev.

3 Likes

Thank you for the pointers. It got me past this hurdle. But I can already see that the new learning curve will be interesting to say the least :persevere:

does this mean for 0.7-dev that Pkg and Pkg3 are different thins or they intersect somewhere or else Pkg3 replace both Pkg and PkgDev.

How are package maintainers supposed to tag new versions in Julia 0.7?

Use https://github.com/attobot/attobot

1 Like

Is this also how people are supposed to publish new packages? The official documentation (at least coad-loading, Pkg, and modules) seems to be missing information about registering and tagging packages with the new package manager.

Yes for now.

Also, does the required use of attobot for tagging packages mean that you can no longer tag private packages not hosted on github?

It is not required, you can make a PR to METADATA yourself.

I see, so METADATA is still the official registry, and https://github.com/JuliaRegistries/General is just based off of it?

Yea, General is just a translation from METADATA. In the future you will register directly to General.

Thanks!

Is there a replacement for PkgDev.publish for making a PR when fixing bugs in a foreign package?

If you have to, you can also checkout the repo on v0.6 and then use PkgDev in 0.6 to publish, it doesnt matter if the package code doesnt run in 0.6, PkgDev can still be used, just not on 0.7

In the long-term (without having to refer to Julia 0.6) which is the suggested approach to make PR to fix bugs in other people’s package ?

  1. pkg> dev ThatPackage (assuming that is installed),

  2. make a git branch in the local repository (will be in ~/.julia/dev/ by default),

  3. test & commit your changes in that branch,

  4. when satisfied,
    a. fork the original project on github,
    b. add your fork as a remote,
    c. push changes,
    d. make a PR from that.

  5. this will run tests. repeat 3-4 until satisfied or as requested by code reviews.

All of this is fairly easy with proper IDE support for git (independently of Julia). If you IDE does not support git, here’s a nickel :wink:

“fairly easy”… that’s opinable… :wink:
Seriously, if there are plans to make something that automatize all that passages it would be better…
Bdw, is suppose there are no differences between dev ThatPackage and develop ThatPackage? (I understood that Pkg.dev() doesn’t exists)

Yep, dev is a shorthand and is identical to develop in the pkg> prompt.

I would suggest that you try the above workflow. It looks complicated before you do it, but it is fairly easy once you do it a few times. Also, being somewhat more hands-on allows you to deal with complications.