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

CLI package resolution throws exceptions for packages that work fine in Unity #155

Closed
1 task done
hybridherbst opened this issue Mar 3, 2024 · 4 comments · Fixed by #364
Closed
1 task done
Labels
bug Something isn't working

Comments

@hybridherbst
Copy link

hybridherbst commented Mar 3, 2024

Bug report

Running openupm add org.khronos.unitygltf results in exceptions in the CLI.
Running with -f works fine and results in a working project.

See

Bug category

  • CLI

Steps to reproduce

  • Make a project on Unity 2022.3
  • Run openupm add org.khronos.unitygltf
  • Note exceptions in the CLI about package resolution
  • Run openupm add org.khronos.unitygltf -f and note it actually works fine

We've been using 10.0.0 as dependency forever, and Unity will always auto-upgrade older ShaderGraph versions to the correct built-in version actually available in each specific version of Unity.

What is expected?

No error in the openupm CLI, makes it look as if dependencies would be wrong in the package.

What is actually happening?

Exception in the CLI

@favoyang
Copy link
Member

favoyang commented Mar 4, 2024

Regarding the reference #133, Unity has ceased using the registry for built-in packages. Now, built-in packages are resolved from the "BuiltInPackages" folder included with the Editor. If there is a version mismatch, it simply gets ignored.

For now, use -f until #133 gets fixed.

A test for Unity2022.3.17f1:

image

@ComradeVanti
Copy link
Collaborator

Does this issue have any difference to #133? If not we could close it right?

@ComradeVanti ComradeVanti linked a pull request Jun 28, 2024 that will close this issue
@ComradeVanti ComradeVanti added the bug Something isn't working label Jun 28, 2024
@favoyang
Copy link
Member

Does this issue have any difference to #133? If not we could close it right?

Yes and no.

org.khronos.unitygltf depends on com.unity.shadergraph@10.0.0. Because Unity always uses the built-in version shipped with the editor, it will work fine.

#133 wants to resolve this issue. However, 10.0.0 is not an existing version. The only 10.0.x version (paired with Unity 2020) is 10.0.0-preview.27 and is available on the Unity registry.

Depends on how #133 is implemented

  • If we verify the Unity built-in package version strictly (search from the Unity registry, then the version list from manual docs, perhaps reading local editor built-in package folder), the author are required to set a valid version (10.1.0 for example).
  • Otherwise, this issue is fixed if we ignore version verification for Unity built-in packages.

@favoyang
Copy link
Member

Depends on how #133 is implemented

  • If we verify the Unity built-in package version strictly (search from the Unity registry, then the version list from manual docs, perhaps reading local editor built-in package folder), the author are required to set a valid version (10.1.0 for example).
  • Otherwise, this issue is fixed if we ignore version verification for Unity built-in packages.

After reading the implementation of #364, the built-in package version verification has been bypassed. Then this will be resolved with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants