I’d like to report back on my recent (last night) experience with package publishing - ultimately the happy path failed.
1/ per the docs I’ve used the hub
binary – hub create
is a great way of setting up the remote repo. However, I suspect hub
has a problem handling repos ending up with a .jl
prefix. Notice that in the output, the repo is created without the .jl
postfix:
$ hub create
github.com username: essenciary
github.com password for essenciary (never stored):
origin https://github.com/essenciary/IssueReporter.jl.git (fetch)
origin https://github.com/essenciary/IssueReporter.jl.git (push)
created repository: essenciary/IssueReporter
Obviously, pushing to it will fail:
$ git push origin master
remote: Repository not found.
fatal: repository 'https://github.com/essenciary/IssueReporter.jl.git/' not found
Thus updating the origin was necessary:
$ git remote set-url origin https://github.com/essenciary/IssueReporter.git
2/ PkgDev.register
worked, but PkgDev.publish
did not:
julia> PkgDev.register("IssueReporter")
INFO: Registering IssueReporter at https://github.com/essenciary/IssueReporter.git
INFO: Committing METADATA for IssueReporter
julia> PkgDev.publish()
ERROR: There are no METADATA changes to publish
Stacktrace:
[1] (::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String})(::Base.LibGit2.GitRepo) at /Users/adrian/.julia/v0.6/PkgDev/src/entry.jl:72
[2] with(::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:608
[3] publish(::String, ::String) at /Users/adrian/.julia/v0.6/PkgDev/src/entry.jl:64
[4] publish() at /Users/adrian/.julia/v0.6/PkgDev/src/PkgDev.jl:u7533:
3/ PkgDev.tag
worked, but again, PkgDev.publish
did not:
julia> PkgDev.tag("IssueReporter")
INFO: Tagging IssueReporter v0.0.1
INFO: Committing METADATA for IssueReporter
julia> PkgDev.publish()
ERROR: SystemError: opening file /Users/adrian/.julia/v0.6/METADATA/BSON/versions/0.1.0/sha1: No such file or directory
Stacktrace:
[1] #systemerror#44 at ./error.jl:64 [inlined]
[2] systemerror(::String, ::Bool) at ./error.jl:64
[3] open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./iostream.jl:104
[4] open(::Base.#readstring, ::String) at ./iostream.jl:150
[5] readchomp at ./io.jl:491 [inlined]
[6] (::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String})(::Base.LibGit2.GitRepo) at /Users/adrian/.julia/v0.6/PkgDev/src/entry.jl:79
[7] with(::PkgDev.Entry.##4#9{String,Dict{String,Array{String,1}},String}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:608
[8] publish(::String, ::String) at /Users/adrian/.julia/v0.6/PkgDev/src/entry.jl:64
[9] publish() at /Users/adrian/.julia/v0.6/PkgDev/src/PkgDev.jl:75
So unless there’s an easy fix, I presume I’m stuck with trying the manual approach.
Here’s some debug info:
julia> MetadataTools.get_pkg("IssueReporter")
IssueReporter https://github.com/essenciary/IssueReporter.git
0.0.1,f37dce,julia 0.6,GitHub,MetadataTools,URIParser
julia> versioninfo()
Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, skylake)