I am just looking at the registration process (I have never done it before), and I am not sure to fully understand everything. Is there a way to register on the General repository a (publicly available) package hosted on a self-hosted gitlab instance? I have the feeling that only git repositories of the main gitlab.com instance (and github repositories) are supported, is that right? Any workaround?
Is there any potential problem with using url everywhere, except that it’s longer to write, and not cool for other users? For instance if I have two self-hosted packages Lib and App, is it OK to add Lib to App dependencies by providing its url, and share App with the rest of the world by sharing its url? Does it make any difference in practice with what would happen if both packages were registered?
Just mirror the repo on Github/Gitlab (disable issues, PRs, etc; the readme should indicate where to make them). On a self-hosted Gitlab instance, you can do this automatically with a hook after each commit (I think, never tried).
Generally, using URLs of package repos directly makes it difficult to work with the resolver. In due time, your package will have multiple versions, with various compatibility requirements, so the cleanest solution is putting it in a registry.
Note that if the package is for a limited audience, an internal/local registry is also an option. See various packages that make running one easier.
Thank you for these details. It is good to know that there is this mirroring option, but it is indeed only a workaround as it defeats the original purpose (which was not to use github).
Is it possible to know why the resolver might have problems when working with urls? Creating an internal registry is probably the cleanest option, but maybe overkill for my simple needs. And indeed the package is targeted for a limited audience.
AFAIK there’s no reason you shouldn’t be able to register an arbitrary publicly available git repo in General. The convenient options (Registrator/JuliaHub) won’t work, but a manual PR should do the trick.
Well my research lab runs a gitlab instance, so it makes sense for me to keep code here rather than centralizing everything on Github. Regarding the uptime, it might not beat github, but should be good enough. But I totally understand that as a first step the Julia community decided to support only github/gitlab.
You can definitely make a manual pull request to register the package. It will need a human to merge it. Feel free to post in the #pkg-registration channel on Slack, and someone will take a look at it.
You should be able to use a package to help you generate your registration pull requests.
@GunnarFarneback Could a user use LocalRegistry.jl to generate a manual pull request to the General registry (instead of to a private registry).
@davidanthoff Could a user use PkgDev.jl to generate a manual pull request to the General registry?
Interesting! Sorry but this is not obvious for me, could you detail exactly how to do it? Is there a way to do something like register(MyLocalPackage, general)? Should I fork the General repository, use register on this local fork, and then do a PR from that?
Side question with respect to the OP’s @GunnarFarneback : In order to setup a julia registry on a self-hosted Gitlab I guess one can do create_registry targeting the correct path. But then how could the package developers register their packages ? Would you have an idea ?