Open psydack opened 3 years ago
Did you try to add it using the openupm cli?
Yes, but openupm add a scoped registry to make manageable by Package Manager, but packages can't use it. Try to make a package that needs your package (com.kuraiandras.numericsconverter).
{
"name": "Something",
"displayName": "New Package",
"version": "0.0.1",
"description": "Sample Description",
"unity": "2020.3",
"dependencies": {
"com.kuraiandras.numericsconverter" : "2.0.0"
},
"keywords": [
],
"author": {
"name": "Oi",
"url": "https://github.com/KuraiAndras/NumericsConverter"
}
}
In this case shouldn`t just adding the registry scoped to this project to the project consuming the libaray fix it?
No because the unity don't use, I don't know why, scoped registry on packages. I tried but failed.
Then you should be able to reference the project just with a git dependency like so (according to documentation):
"com.kuraiandras.numericsconverter": "https://github.com/KuraiAndras/NumericsConverter.git?path=/NumericsConverter/Assets/NumericsConverter"
for a specific version under a tag this should work:
"com.kuraiandras.numericsconverter": "https://github.com/KuraiAndras/NumericsConverter.git?path=/NumericsConverter/Assets/NumericsConverter#2.0.0"
Does this work for you @psydack?
Yes. Thanks for the explanation.
Sorry to reopen. This will only works on main manifest, if you put this on dependency from a package that won't work.
Make and empty folder (as a package) and put on packages folder Put your repo as dependency from that package
Can you show how you reference the package? Or a link to a full repro?
Did you try specifiying a specific version/tag?
"com.kuraiandras.numericsconverter": "https://github.com/KuraiAndras/NumericsConverter.git?path=/NumericsConverter/Assets/NumericsConverter#2.0.1"
Yes, same error:
https://issuetracker.unity3d.com/issues/package-manager-doesnt-resolve-package-dependencies-when-using-git-url-to-add-a-package-which-contains-a-git-url-dependency According to this, it is by design. You can't add git dependencies to a package.json file.
Are you sure you can't make this work with the openupm package?
this in you package.json
"dependencies": {
"com.kuraiandras.numericsconverter" : "2.0.1"
},
And then add the scoped registry from openupm in the consuming project?
I could add that as a need to the person who will use my package, but that's too much for a simple conversion. I manually embed to my packages your package, it's okay to me: https://github.com/psydack/uimgui/commit/d2706f555578c8f79349d156453cbe38998b034b. I am just leaving this issue because some can have this error too.
On Wed, May 26, 2021 at 10:36 AM Kurai András @.***> wrote:
https://issuetracker.unity3d.com/issues/package-manager-doesnt-resolve-package-dependencies-when-using-git-url-to-add-a-package-which-contains-a-git-url-dependency According to this, it is by design. You can't add git dependencies to a package.json file.
Are you sure you can't make this work with the openupm package?
this in you package.json "dependencies": { "com.kuraiandras.numericsconverter" : "2.0.1" },
And then add the scoped registry from openupm in the consuming project?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/KuraiAndras/NumericsConverter/issues/2#issuecomment-848776007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHK3M572WNMWOTIXMDQS6TTPT2O5ANCNFSM44PLEVXQ .
Hello!
[SUGESTION] I couldn't add NumericsConverter to another package because packages can not use scoped registries (needed by upm). Maybe it will worth to make a repository to be able to add at unity packager as "git url".
Thanks for putting effort on this.