Unable to install unregistered package RegTools

Hi there!

Am trying to install an unregistered package that lies on a repo, called RegTools. I try to Pkg.add(PackageSpec(url="https://github.com/wakakusa/RegTools/blob/master/src/RegTools.jl")) but I get the following error:

ERROR: failed to clone from https://github.com/wakakusa/RegTools/blob/master/src/RegTools.jl, error: GitError(Code:ERROR, Class:Net, unrecognized URL prefix)

I cannot seem to be able to figure out what is going on, since the url is valid and also am not staying behind any firewall…In general, I have never had connectivity issues and I do not think it has anything to do with my machine (Mac OS Catalina)

Could someone help me with that?
A short related question to unregistered packages: If someone else has created an unregistered package that you would very much like to see it registered, what is the common practice? Would you fork it and register it on your own with the appropriate licence and other notices?

Thanks a lot in advance!


Try this

Pkg.add(PackageSpec(url="https://github.com/wakakusa/RegTools/", rev = "master"))

I wish Pkg could detect the branch from the URL itself, but it cannot yet.

1 Like

Thanks for the quick response and the info about the inability of Pkg to detect the branch @Amin_Yahyaabadi !

Unfortunately, I still get the exact same message…

Yes you need to specify branch in rev.

I checked the repository itself. That package is very old. It doesn’t have a Project.toml. You should upgrade it to make it compatible with newer Julia versions.

Quickly searching for the alternatives I get this:

If you cannot find what you need in the newer packages, I recommend you to clone the repository and update it yourself. Start by making a template from here:

Then go through the source code.

1 Like

Thanks a lot @Amin_Yahyaabadi !

I guess the problem could be related to the fact that there is no Project.toml file included. What is the common practice in that case? To fork it and then create a new package using the PkgTemplates.jl within my own github account? I am not experienced with this kind of cases…What would you suggest?

Thanks again for your willingness to help! I appreciate it!


P.S. Am not sure what is the most appropriate to do in such a case that someone else has written the code and you are asked to create a package out of it… thanks!

Here you are RegTools.zip

I updated the basic semantic changes and added deps. The package now loads, but the actual behavior isn’t tested.

Register the package once you are sure it is working. You can add the name of the original authors to LICENSE and you will be fine.

Thanks a ton @Amin_Yahyaabadi !

I will take my time as I progressively find my steps onto Julia…



1 Like

You’re welcome! I hope you have a great journey. :julia:

I forgot to add DataFrames to the deps. Add the following line to Project.toml under [deps] section:

DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
1 Like