OpenUPM - UPM Registry with Automatic Build Pipelines

Hi Folks,

My Secret Santa Gift for the 2019:

It’s been a while since the first leak on the unity forum. For the past few months, I’ve been working on this hobby project. I’m glad that the OpenUPM service reaches beta stage!


OpenUPM is a service for hosting and building open source unity package manager (upm) packages. It’s composed of two parts: a managed upm package registry with an automatic build pipelines. The intention is to create an universal platform to discover, share and distribute open source upm packages, and a community along with it.

The major difference between OpenUPM and other 3rd-party upm registry is that the service does not require project owner to submit package updates regularly. Instead, it maintains a curated list of upm repository and enables any GitHub users (called packager hunter) to discover and submit upm repositories to the list. The automatic build pipelines monitor the changes and publish new releases later then. The unique approach helps grow the platform with the community.

To learn more

Happy Holiday and Happy Coding

14 Likes

Hey, amazing job you did there. Congratulations.

I looked around for a while but I couldn’t see an option for uploading a package from the command line. Is it possible?

1 Like

@starikcetin Thanks for your awesome-upm project, really helpful.

While there’s no way to publish (upload) package via the command line (push mode). The service uses GitHub as a database for the curated package list (CRUD, PR as review), and the automatic build pipeline does the package publishing job for you (pull mode).

I may create an openupm publish/submit command, but that will be a shortcut to fill the package form.

There maybe one exception that if a package need very custom build process, which has to relay on push mode. But I’m looking for an example repository to figure it out.

Got it. Will be adding my packages when I get the chance :slight_smile:

Blog updates

This is great! Congrats on this wonderful project.
We shared it with the team :slight_smile:

1 Like

Blog update: How to Maintain UPM Package Part 2: Automating Releases with GitHub Actions

Blog update: How to Maintain UPM Package Part 3: Managing a forked repository

Blog update: OpenUPM Round-up

2 Likes

The project is growing pretty quickly! Trying it out; submitting and downloading packages feels really natural. This project is going to take off, for sure.

2 Likes

@Favo-Yang very good work! Thanks you.

@Favo-Yang There’s one thing that worries me now that I see all this starting to take off.

I see that there are many packages published in openupm that use third party libraries (usually nuget) and have the problem that when two packages include different versions they conflict.

Real examples with official Unity packages:

Example of a package published in openupm:

https://github.com/Halodi/halodi-unity-package-registry-manager/tree/master/ThirdParty

For this there is a very good solution created by a Unity developer ( @xoofx ):

https://github.com/xoofx/UnityNuGet

In case @xoofx doesn’t want to mantain new packages addition via PR:

Would there be any way to publish the project from this repository on a server and make it publicly accessible? This way nuget dependencies could be referenced:

2 Likes

@bdovaz ,

Thanks for bringing this into my attention. Nesting DLLs directly into the UPM package is a hacky practice to make a single package just work. But get troubled when two packages included the same DLL. To resolve the conflict, you have to eject (embed) one package manually to the Packages, then remove the DLL. The ideal solution is to have a group of NuGet packages converts to UPM format to allow other packages to reference.

xoofx’s UnityNuGet is such a project with limited resources and an automatic approach. These packages are using org.nuget as scope.

https://github.com/worldreaver is also something similar and published to OpenUPM. e.g. https://openupm.com/packages/com.worldreaver.systemmemory/. These packages are using com.worldreaver as scope.

There’re other cases like Json.NET 12.0.3 for Unity | jillejr.newtonsoft.json-for-unity | Unity Package (UPM) | OpenUPM does for Newtonsoft.Json, by adding more features like custom builds targeting different platforms and link.xml for code stripping.

Notice that though these packages are using their own package namespace, the DLL filenames are the same. So you can only install one of them.

What I may come with is a solution to make it easier to publish NuGet package to OpenUPM.

  • It can be something like xoofx does, using an automatic approach. I need more research to see if it can be achieved for adding customization automatically like the newtonsoft.json example above.
  • It can be something like worldreaver does use one GitHub repository for one NuGet package, but with a more “official” namespace. This will be less work for OpenUPM to verify those packages and more flexible to add customizations. And we may need to develop a GitHub Action to help track NuGet changes and create PR automatically.

I’m not sure which way to go, probably need some trial-and-error process. When these packages are ready, we can start to promote it to the community, but promoting a good practice may take a long time.

Tracked as NuGet packages · openupm/openupm · Discussion #553 · GitHub

To avoid conflicting DLL’s I

  • Prefix the name with a unique hash (package name resulted in very long path names)
  • Disable “Auto Reference”
  • In the packages asmdef, enable “Override references” and reference the assemblies explicitly.

However, I have only tested with the same dependency in multiple packages. Yesterday, I made a mistake and forgot to update the assembly references and the package still worked after publishing, which is unexpected.

If conflicts still show up, I might have to switch to including the source for third party dependencies instead of the dll and make them unique to the package with an assembly definition.

Blog update: How to Maintain UPM Package Part 4: Managing Package Release with CLI | by Favo Yang | OpenUPM | Medium

1 Like

Blog update: Unity Package Manager 2020.1 Round-up | by Favo Yang | OpenUPM | Medium

1 Like

Blog update: How to Authenticate with a UPM Scoped Registry using CLI

1 Like

Thank you for taking the time to make openUPM.
It’s so good!

1 Like

Important changes of Unity TOS and new Package Guidelines, and OpenUPM’s first response.