mob-sakai / GitDependencyResolverForUnity

This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!
MIT License
248 stars 33 forks source link

Some files in GitDependencyResolverForUnity conflicts with UpmGitExtension #16

Closed dimmduh closed 5 years ago

dimmduh commented 5 years ago

Version 'https://my.gitlab.com/npm/test.git#1.1.1' is invalid. Expected a 'SemVer' compatible value. (NotFound)

{ "name": "com.test", "displayName": "My test", "version": "2.1.4", "unity": "2019.1", "description": "above. ", "dependencies": { "com.test22": "https://gitlab.io-games.com/npm/test.git#1.1.1" } }

dimmduh commented 5 years ago

Removing library folder does not help.

mob-sakai commented 5 years ago

Hi @dimmduh I would like to know more information on this issue.

Environment (please complete the following information):

dimmduh commented 5 years ago

Windows 7 SP1 Unity 20191.10f1 v1.1.2

starikcetin commented 5 years ago

I am also experiencing this issue:

Error: Unable to add package [com.starikcetin.eflatun.unitycommon@https://github.com/starikcetin/Eflatun.UnityCommon.git#0.0.1-upm]:
  Package com.starikcetin.eflatun.unitycommon@https://github.com/starikcetin/Eflatun.UnityCommon.git#0.0.1-upm has invalid dependencies:
    com.starikcetin.eflatun.expansions: Version 'https://github.com/starikcetin/Eflatun.Expansions.git#0.1.0-upm' is invalid. Expected a 'SemVer' compatible value. (NotFound)
UnityEngine.Debug:LogErrorFormat(String, Object[])
Coffee.PackageManager.Debug:LogErrorFormat(String, Object[]) (at Library/PackageCache/com.coffee.upm-git-extension@79fa88282ae1233e4841d87fd256b80f13cd8b62/Editor/Scripts/Common/Utils.cs:43)
Coffee.PackageManager.PackageUtils:UpdatePackageRequest() (at Library/PackageCache/com.coffee.upm-git-extension@79fa88282ae1233e4841d87fd256b80f13cd8b62/Editor/Scripts/Common/Utils.cs:443)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Windows 10 Unity 2019.2.5f1 GitDependencyResolverForUnity 1.1.2 UpmGitExtension 0.9.1

starikcetin commented 5 years ago

This is weird, but putting git+ at the beginning of the URL works in manifest.json:

"com.starikcetin.eflatun.unitycommon": "git+https://github.com/starikcetin/Eflatun.UnityCommon#0.0.1-upm"

Update: Doesn't work for package.json dependencies.

starikcetin commented 5 years ago

I got it working but it is very inconsistent. It only works if I close unity, delete the library folder, and paste the references manually into manifest.json. Dependencies are not resolved if I try importing the repo using UpmGitExtension.

onMouseUp commented 5 years ago

For any reason I can't resolve dependencies from package.json. Same exception: "Expected a 'SemVer' compatible value". Plugin & Extension works like a charm as long as I don't set a dependency in package.json. Is there a Demo-Project to check if i missed something?

MAC: 10.14.6 Unity 2019.1.1f1 GitDependencyResolverForUnity 1.1.2 UpmGitExtension 0.9.1

mob-sakai commented 5 years ago

Hi @dimmduh @starikcetin @onMouseUp

Sorry for my late reply.

Some files in GitDependencyResolverForUnity conflicts with UpmGitExtension . (These packages use the same namespace Coffee.PackageManager )

I will fix it. :)

mob-sakai commented 5 years ago

Version 1.1.3 is released. Try it!

starikcetin commented 5 years ago

Does it work for UpmGitExtension also? Didn't have time to check yet.

mob-sakai commented 5 years ago

Yes, I tested it with demo repo. https://github.com/mob-sakai/UnityGitDependencyTest

starikcetin commented 5 years ago
Error: Unable to add package [com.starikcetin.eflatun.unitycommon@https://github.com/starikcetin/Eflatun.UnityCommon.git#0.0.3]:
  Package com.starikcetin.eflatun.unitycommon@https://github.com/starikcetin/Eflatun.UnityCommon.git#0.0.3 has invalid dependencies:
    com.starikcetin.eflatun.expansions: Version 'https://github.com/starikcetin/Eflatun.Expansions.git#0.1.1' is invalid. Expected a 'SemVer' compatible value. (NotFound)
UnityEngine.Debug:LogErrorFormat(String, Object[])
Coffee.PackageManager.Debug:LogErrorFormat(String, Object[]) (at Library/PackageCache/com.coffee.upm-git-extension@79fa88282ae1233e4841d87fd256b80f13cd8b62/Editor/Scripts/Common/Utils.cs:43)
Coffee.PackageManager.PackageUtils:UpdatePackageRequest() (at Library/PackageCache/com.coffee.upm-git-extension@79fa88282ae1233e4841d87fd256b80f13cd8b62/Editor/Scripts/Common/Utils.cs:443)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Importing via UpmGitExtension doesn't work still :(

mob-sakai commented 5 years ago

Hmm, works well on Unity 2018.3, but not on Unity 2019.1. New issue: #18