Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to register a registry in a registry #1791

Closed
felipenoris opened this issue Apr 23, 2020 · 12 comments
Closed

Allow to register a registry in a registry #1791

felipenoris opened this issue Apr 23, 2020 · 12 comments

Comments

@felipenoris
Copy link
Contributor

This idea would improve the discoverability of packages (for instance, using the pkg.julialang.org search engine) that are in registries outside the general registry.

pkg> add AnotherRegistry@packagename#master
@fredrikekre
Copy link
Member

Why not

pkg> registry add AnotherRegistry

pkg> add packagename#master

?

@felipenoris
Copy link
Contributor Author

Even better!

@felipenoris
Copy link
Contributor Author

@fredrikekre , is this available? I though that only registry add URL was allowed. The name AnotherRegistry would need to be registered somewhere for it to be expanded in its URL.

@fredrikekre
Copy link
Member

Yea you have to add with a URL.

@felipenoris
Copy link
Contributor Author

Ok, I'm sorry if I was not clear on the suggestion.
The idea I'm giving you is to let the name AnotherRegistry be registered in the general registry (or default registry) linking the registry name to its URL so that pkg> add AnotherRegistry would work. This would allow pkg.julialang.org to search packages outside the general registry.

@fredrikekre fredrikekre reopened this Apr 23, 2020
@fredrikekre
Copy link
Member

Why not just register the packages in the General registry then?

@fredrikekre
Copy link
Member

I also don't understand what pkg.julialang.org has anything to do with this?

@felipenoris
Copy link
Contributor Author

felipenoris commented Apr 23, 2020

Why not just register packages in general: By the same reason people want to create a different registry. For instance, one could group project related packages in the registry, with different CI rules, get a new namespace for packages.

what pkg.julialang.org has to do with this: the general registry has no link to other registries. AFAIK, the pkg.julialang.org searches for things that are registered in the general registry. If you link other registries to the general registry, you create a tree of registries that are discoverable from the general registry. For instance, https://github.com/JuliaFinance/JuliaFinance is a separate registry. If it was discoverable from the general registry then pkg.julialang.org would show results for Countries.jl , which is a silly package to put in the general registry alone, but very important in the context of the other packages in the JuliaFinance registry. Also, there's Currencies.jl in JuliaFinance that clashes with the one in the general registry.

@EricForgy
Copy link

Thanks for bringing this up @felipenoris.

This topic is particularly relevant for JuliaFinance where package names can and should be simple and unambiguous within a financial context, but would be ambiguous in a General context.

I'd be happy to archive the JuliaFinance registry, if we could have some kind of package namespacing on General, e.g. it would be awesome if we could register a package on General and do things like

pkg> add @JuliaFinance/Currencies

and, in code, simply do

using Currencies

I found this issue while searching for another old issue where namespacing was proposed. Registering registries was also proposed at the time. The idea has some appeal to me and makes things more decentralized. For example, if the JuliaFinance registry could registry itself on the General registry, then namespaces would simply point to that registry with no need for users to do registry add and we can stay within the same ecosystem to improve discoverability, user experience, etc. That feels like more work though. An easier win is if we can just get namespacing to work on General and keep everything there.

@DilumAluthge
Copy link
Member

An easier win is if we can just get namespacing to work on General and keep everything there.

I have opened an issue that is a feature request for namespaces: #1836

@EricForgy
Copy link

Btw, @felipenoris, after what I consider a fruitful discussion with Alec and Dilum culminating in #1836, I decided to archive the JuliaFinance registry. Please let me know if this causes you any problems.

Assuming we make progress with #1836, once implemented, I can add the basic packages, e.g. Currencies, Positions, etc., to the JuliaFinance namespace on the General registry. This feels like the cleanest solution. For the time being, we'll probably need to continue just deving the JuliaFinance packages not yet registered on General.

How does that sound?

@felipenoris
Copy link
Contributor Author

@EricForgy nice! No problem archiving the JuliaFinance registry.

Regarding the NameSpaces feature in #1836, I'll post in the issue thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants