Search Unity

New Github package registry sounds really interesting

Discussion in 'Package Manager' started by arielsan, May 11, 2019.

  1. arielsan

    arielsan

    Joined:
    Dec 3, 2013
    Posts:
    28
    5argon, mobuni5, De-Panther and 2 others like this.
  2. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    396
    I see two issues that prevent the Github Package Registry being used with Unity:

    1. The registry requires authentication, which Unity does not yet support. I wasn't able to install a package as an anonymous user and the docs do instruct you to authenticate before installing a package. I'm not sure if Github plans to allow anonymous installs for public packages at a later time. Unity has stated they're planning to support authentication but that it's not a high priority at this point.

    2. The registry uses @-scopes for packages. Unity has decided to instead use reverse domain names and prefixes thereof for their scoped registry implementation and don't allow @ as part of package names (last time I checked, at least). This means that packages from the Github Package Registry can't be used with Unity, unless Unity explicitly adds support for @-scoped package names.
     
    monry likes this.
  3. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    630
    @Adrian is right, I've looked at the documentation and tested their sample package in a Unity project. It doesn't work with Unity Package Manager. Sadly, Github packages registry is tightly coupled with npm's scope registry feature and this is not something we support. We will investigate further and see what we can do.

    Regards,

    Pascal
     
    monry likes this.
  4. monry

    monry

    Joined:
    May 23, 2019
    Posts:
    2
    I'm interested in this topic too.
    I was thinking of build a registry using Verdaccio on my own, but I'll use GitHub Package Registry if Unity supports it.
     
  5. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    630
    @monry I've requested beta access to test the feature in more depth with Unity.
     
    dzamani, fuqunaga and monry like this.
  6. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    140
    is there any news on how/when/if unity plans to support github package registries?
     
  7. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    319
    I want to know the progress too. Will it support or it won't
     
  8. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    630
    Hi,

    The Github registries feature is deeply tied to *npm's scoped packages*. Sadly, our client implementation has diverged from the *npm* client and we don't have support for *npm's scoped packages*. If you guys find a way to refer to a Github registry directly without using a scoped package (e.g. using the
    registry
    attribute in the configuration), please let us know!

    Supporting Github registries is not something we have in our short-term or mid-term plans. Sorry!

    Regards,

    Pascal
     
  9. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    319
  10. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    268
    It would be great if you did, though.
     
    Last edited: Sep 5, 2019
  11. io-games

    io-games

    Joined:
    Jun 2, 2016
    Posts:
    73
    Ohh... I think its wrong way. Github is most popular code repo in the world.
    Still no fully npm and github support, one year more and programmers will replace unity package manager for custom solutions.
    I was waiting branches in collab for years, one day dropped and switched to pure git, no regrets.
     
  12. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    140
    You can use google cloud to deploy a linux npm registry for free. That's how I host my scriptable framework:

    https://github.com/pablothedolphin/Scriptable-Framework

    This also allows my packages to have dependencies with one another and to Unity's own packages. It works exactly as you would expect.
     
  13. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    268
    Thanks for sharing and yes, very cool. But I am tired of reinventing the wheel with Unity for everything. Come on... Why not just adopt an existing package manager solution and let us use the registries already available?
     
    Lars-Steenhoff likes this.
  14. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    725
    As you have already said, it seems to me a very bad strategy to use resources to "remake" something (upm) that is already done (npm) and at the same time remove functionalities that already exist in the other widely used solution.
     
    starikcetin and Thaina like this.
  15. sunfl0wr

    sunfl0wr

    Joined:
    Mar 11, 2015
    Posts:
    13
    Any news on this? Is there any plan for when this will be supported? Or any decision that this will never be supported?
     
  16. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    356
    Something related: if you're working on an open source UPM project. You can submit it to the OpenUPM registry. It's not a traditional push based registry, read the beta announcement for details. Also some tips about maintaining a UPM project: How to Maintain an UPM project Part 1.

    I'm glad to help you convert your UPM project to the platform. Just leave a word here or create an issue for help.
     
    starikcetin likes this.
unityunity