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

Support for Unity editor #27295

Open
secustor opened this issue Feb 14, 2024 Discussed in #27219 · 1 comment · May be fixed by #28189 or ViMaSter/renovate#7
Open

Support for Unity editor #27295

secustor opened this issue Feb 14, 2024 Discussed in #27219 · 1 comment · May be fixed by #28189 or ViMaSter/renovate#7
Labels
help wanted Help is needed or welcomed on this issue new datasource New datasource support new package manager New package manager support new versioning New versioning support priority-4-low Low priority, unlikely to be done unless it becomes important to more people

Comments

@secustor
Copy link
Collaborator

Discussed in #27219

Originally posted by ViMaSter February 11, 2024

Tell us more.

#19300 mentioned using Renovate with the Unity game engine, however, that post was focused on packages used inside Unity projects, not the Unity editor itself.

Unity uses a simple ProjectVersion.txt file for managing editor versions and has RSS feeds for all release streams (beta, stable, LTS) that follow the same structure.

I have already built the manager for one of the games I'm working on, so I'd be happy to integrate it back upstream.

Would this be something worth integrating or better solved via a custom fork?
Speaking from personal experience, with CI/CD gaining more and more traction in game development, having an automated dependency check for various game engines would be super useful to me.

@secustor secustor added priority-4-low Low priority, unlikely to be done unless it becomes important to more people new package manager New package manager support new versioning New versioning support new datasource New datasource support labels Feb 14, 2024
@secustor
Copy link
Collaborator Author

I've only seen this questionnaire posted inside GitHub issues, so if you want me to create a separate issue instead of keeping it inside discussions, let me know!


New package manager questionnaire

Did you read our documentation on adding a package manager?

Basics

What's the name of the package manager?

Unity3D

What language(s) does this package manager support?

Not really applicable.
Unity supports C#, but this manager only handles which version of the Unity Editor and runtime is associated with a project (similarly to updating Node.js via the nvm provider).

How popular is this package manager?

According to SteamDB

Does this language have other (competing?) package managers?

  • Yes (give names).
  • No.

What are the big selling points for this package manager?

  • Enabling continuous runtime updates for game development

Detecting package files

What kind of package files, and names, does this package manager use?

[^/]ProjectSettings/ProjectVersion.txt

Which fileMatch pattern(s) should Renovate use?

[^/]ProjectSettings/ProjectVersion.txt

Do many users need to extend the fileMatch pattern for custom file names?

  • Yes, provide details.
  • No.

Is the fileMatch pattern going to get many "false hits" for files that have nothing to do with package management?

Unlikely, given the need for a ProjectSettings directory containing ProjectVersion.txt, both are case-sensitive.

Parsing and Extraction

Can package files have "local" links to each other that need to be resolved?

No.

Package file parsing method

The package files should be:

  • Parsed together (in serial).
  • Parsed independently.

Which format/syntax does the package file use?

How should we parse the package files?

  • Off the shelf parser.
  • Using regex.
  • Custom-parsed line by line.
  • Other.

Does the package file have different "types" of dependencies?

  • Yes, production and development dependencies.
  • No, all dependencies are treated the same.

List all the sources/syntaxes of dependencies that can be extracted

Only the one listed inside Which format/syntax does the package file use?.

Describe which types of dependencies above are supported and which will be implemented in future

Only the one listed inside Which format/syntax does the package file use?.

Versioning

What versioning scheme does the package file(s) use?

A Unity version consists of

  • semver
  • followed by a letter: denotes a stream ([a]lpha, [b]eta, [f]inal release, etc.)
  • followed by a number: a growing index
  • optionally followed by a hash, wrapped in parentheses: calculated by Unity internally

Example:

  • 2023.2.9f1 (0c9c2e1f4bef)
  • 2023.3.0b6

Reference: Official Unity documentation (see headline Unity version numbers)

Does this versioning scheme support range constraints, like ^1.0.0 or 1.x?

  • Supports range constraints (for example: ^1.0.0 or 1.x), provide details.
  • No.

Lookup

Is a new datasource required?

  • Yes, provide details.
  • No.

Will users want (or need to) set a custom host or custom registry for Renovate's lookup?

  • Yes, provide details.
    • Users might want to opt into specific release streams (alpha, beta, patch, LTS)
  • No.

Where can Renovate find the custom host/registry?

  • No custom host or registry is needed.
    • There's a fixed list of streams, provided by Unity.
      It is not possible to download Unity binaries from a custom host or registry.
  • In the package file(s), provide details.
  • In some other file inside the repository, provide details.
  • User needs to configure Renovate where to find the information, provide details.

Are there any constraints in the package files that Renovate should use in the lookup procedure?

  • Yes, there are constraints on the parent language (for example: supports only Python v3.x), provide details.
  • Yes, there are constraints on the parent platform (for example: only supports Linux, Windows, etc.), provide details.
  • Yes, some other kind of constraint, provide details.
  • No constraints.

Will users need the ability to configure language or other constraints using Renovate config?

  • Yes, provide details.
  • No.

Artifacts

Does the package manager use a lock file or checksum file?

  • Yes, uses lock file.
  • Yes, uses checksum file.
  • Yes, uses lock file and checksum file.
  • No lock file or checksum.
    • Uses a hash in the version string, but not in a separate file; the contents and meaning of the hash are also opaque to end-users.

Is the locksum or checksum mandatory?

  • Yes, locksum is mandatory.
  • Yes, checksum is mandatory.
    • While there have yet to be two releases using the same version number but a different hash, the hash is required by the Unity Hub.
      The Unity Hub manages projects and installed versions of the Unity Editor on a developers system, similar to nvm for Node.js runtimes.
  • Yes, lock file and checksum are mandatory.
  • No mandatory locksum or checksum.
  • Package manager does not use locksums or checksums.

If lockfiles or checksums are used: what tool and exact commands should Renovate use to update one (or more) package versions in a dependency file?

The hash is pre-determined by Unity and can be fetched at the same time as available versions.

Package manager cache

Does the package manager use a cache?

  • Yes, provide details.
  • No.

If the package manager uses a cache, how can Renovate control the cache?

  • Package manager does not use a cache.
  • Controlled via command line interface, provide details.
  • Controlled via environment variables, provide details.

Should Renovate keep a cache?

  • Yes, ignore/disable the cache.
  • No.

Generating a lockfile from scratch

Renovate can perform "lock file maintenance" by getting the package manager to generate a lockfile from scratch.
Can the package manager generate a lockfile from scratch?

  • Yes, explain which command Renovate should use to generate the lockfile.
  • No, the package manager does not generate a lockfile from scratch.
  • No, the package manager does not use lockfiles.

Other

What else should we know about this package manager?

This manager, is aimed at updating the Unity Editor itself, not the packages inside a game project.

Packages inside Unity projects might already be updatable by Renovate, using the npm provider (see #19300), but I've personally not yet used it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help is needed or welcomed on this issue new datasource New datasource support new package manager New package manager support new versioning New versioning support priority-4-low Low priority, unlikely to be done unless it becomes important to more people
Projects
None yet
1 participant