We have a number of package dependencies which have dependencies on git packages. For example, in one package.json
the dependencies section contains:
"dependencies": {
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask"
},
This is working without issues in Unity 2021.3.15, but when when trying to install a package with the above dependency in 2022.2 I get the error:
[Package Manager Window] Error adding package: git@github.com:<repo>.git.
Unable to add package [git@github.com:<repo>.git]:
Package <package_name>@git@github.com:<repo>.git has invalid dependencies or related test packages:
com.cysharp.unitask (dependency): Version 'https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask' is invalid. Expected a 'SemVer' compatible value.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
Somewhat interesting, as well: if I take a Unity 2021 project which already has one of these packages installed and upgrade to 2022, I don’t see any errors related to the package version and the project builds just fine.