Can not find [email protected] via CLI
Originally posted by @from2001 in https://github.com/openupm/openupm-cli/issues/19#issuecomment-1871057403
I think this bug still remains with some packages.
It is OK for com.unity.postprocessing, but this bug still happens with com.unity.render-pipelines.universal
The latest version of com.unity.render-pipelines.universal is now 14.0.9, however,
openupm add [email protected]outputs the error, and maximum version which can be installed is 10.10.1WARN 404 version 14.0.1 is not a valid choice of: 7.0.0, 7.0.1, 7.1.1, 7.1.2, 7.1.5, 7.1.6, 7.1.7, 7.1.8, 7.2.0, 7.2.1, 8.0.1, 7.3.1, 9.0.0-preview.14, 8.1.0, 7.4.1, 9.0.0-preview.35, 8.2.0, 10.0.0-preview.26, 7.4.2, 7.4.3, 9.0.0-preview.55, 7.5.1, 10.1.0, 9.0.0-preview.72, 10.2.0, 8.3.1, 10.2.1, 7.5.2, 10.2.2, 10.3.1, 7.5.3, 10.3.2, 10.4.0, 7.6.0, 10.5.0, 7.7.0, 10.5.1, 10.6.0, 7.7.1, 10.7.0, 10.8.0, 10.8.1, 10.9.0, 10.10.0, 10.10.1Because of this, I cannot add dependencies which requires com.unity.render-pipelines.universal 14.0.1 such as [email protected] in my package.
Please take a look. I will use -f option until this bug fixes.
Thank you for the great service, anyway. Best
The CLI reports that 14.0.9 is not a valid version of com.unity.render-pipelines.universal in the Unity registry. Because the URP package became a built-in package and its publishing on the Unity registry ceased after version 10.
https://docs.unity3d.com/Packages/[email protected]/manual/installing-universalrp-into-an-existing-project.html
For built-in, the version of it has been aligned with your Unity Editor. For example, Unity 2022.2fx assumes to work with URP 14.0.7. When installing the package, it is copied from the Editor folder instead of fetching from the Unity registry.
The Editor folder is located at, /c/Program Files/Unity/Hub/Editor/x.y.z/Editor/Data/Resources/PackageManager/BuiltInPackages/...
My assumption: if you install com.unity.polyspatial for Unity 2022.3 (the minimal editor version polyspatial requires), though com.unity.polyspatial requires version 14.0.1 of URP, what got installed will be the same version that locates in the BuiltInPackages folder above. (I haven't tested it yet).
The solution: CLI should update the internal built-in Unity packages list (or read it from the Unity folder) and ignore them from the validation process.
@all-contributors please add @from2001 for bug.
Thank you @favoyang . I'll wait for the fix of the bug.
Out of curiosity, why does OpenUPM CLI check if the package is compatible at all? Wouldn't it be better to rely on Unity package resolution (which does the correct thing here)?
Out of curiosity, why does OpenUPM CLI check if the package is compatible at all? Wouldn't it be better to rely on Unity package resolution (which does the correct thing here)?
Because the CLI is inspired by npm, I want to maintain similar behavior to reject a user action if there is an error. You can always use -f if you don't care about the verification.
Understood. Then it would be great if the package resolution would be updated to ignore (or treat differently) built-in packages, which I think this issue is for. To OpenUPM CLI users it incorrectly looks like a bug in the used package.
Yes. IMO the entire built-in package verification should be ignored. Because Unity treat all required version to *.
Not sure why I closed this issue. Im pretty sure that this problem still persists