Search Unity

Not all dependencies are listed in manifest

Discussion in 'Package Manager' started by spaceemotion, Dec 25, 2019.

  1. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    I am currently trying to update our dependencies to the ones verified for 2019.3(f3) as well as some preview ones.

    1. Searcher is a dependency that is listed as outdated, but it's in my manifest and I don't know which packages depend on it. While seeing a list of dependencies is really helpful, the reverse is sadly missing as it's equally as important (at least for me, like a yarn why)

    2. When I wanted to update the jobs package, it didn't show anything at all, just an error. Only when I selected "All packages" it showed a red box with each dependency conflict listed. The thing is: they're packages that are not in my manifest. Why could it not import them by itself? Only after I enabled preview packages and installed/updated them by hand, the conflict went away.

    I like the new package workflow, but this stuff is taking a lot longer than in other tools (composer, yarn, npm, ...) simply because of missing information :(
     
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    Indirect dependency should not list in manifest.json right? I don't understand the com.unity.searcher package appears in your manifest.json. Could you print your manifest.json file?

    It can be a feature request to add `list` command to show the dependencies and `why` for the reverse to the openupm-cli - a 3rd-party command line tool.
     
  3. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    While indirect dependencies should not be listed in the manifest, I have no .lock file to look at, and they're also not listed in the Package Manager under "My Project".

    This is my current manifest file:

    Code (JavaScript):
    1. {
    2.   "dependencies": {
    3.     "com.unity.burst": "1.2.0-preview.11",
    4.     "com.unity.cinemachine": "2.3.4",
    5.     "com.unity.entities": "0.4.0-preview.10",
    6.     "com.unity.ext.nunit": "1.0.0",
    7.     "com.unity.ide.rider": "1.1.4",
    8.     "com.unity.ide.vscode": "1.1.3",
    9.     "com.unity.jobs": "0.2.2-preview.6",
    10.     "com.unity.mathematics": "1.1.0",
    11.     "com.unity.physics": "0.2.5-preview.1",
    12.     "com.unity.quicksearch": "1.4.1",
    13.     "com.unity.render-pipelines.core": "7.1.7",
    14.     "com.unity.render-pipelines.universal": "7.1.7",
    15.     "com.unity.scriptablebuildpipeline": "1.6.3-preview",
    16.     "com.unity.settings-manager": "1.0.1",
    17.     "com.unity.test-framework": "1.1.9",
    18.     "com.unity.test-framework.performance": "1.3.3-preview",
    19.     "com.unity.textmeshpro": "2.0.1",
    20.     "com.unity.timeline": "1.2.9",
    21.     "com.unity.ugui": "1.0.0",
    22.     "com.unity.visualeffectgraph": "7.1.7",
    23.     "nuget.mono-cecil": "0.1.6-preview",
    24.     "com.unity.modules.ai": "1.0.0",
    25.     "com.unity.modules.androidjni": "1.0.0",
    26.     "com.unity.modules.animation": "1.0.0",
    27.     "com.unity.modules.assetbundle": "1.0.0",
    28.     "com.unity.modules.audio": "1.0.0",
    29.     "com.unity.modules.cloth": "1.0.0",
    30.     "com.unity.modules.director": "1.0.0",
    31.     "com.unity.modules.imageconversion": "1.0.0",
    32.     "com.unity.modules.imgui": "1.0.0",
    33.     "com.unity.modules.jsonserialize": "1.0.0",
    34.     "com.unity.modules.particlesystem": "1.0.0",
    35.     "com.unity.modules.physics": "1.0.0",
    36.     "com.unity.modules.physics2d": "1.0.0",
    37.     "com.unity.modules.screencapture": "1.0.0",
    38.     "com.unity.modules.terrain": "1.0.0",
    39.     "com.unity.modules.terrainphysics": "1.0.0",
    40.     "com.unity.modules.tilemap": "1.0.0",
    41.     "com.unity.modules.ui": "1.0.0",
    42.     "com.unity.modules.uielements": "1.0.0",
    43.     "com.unity.modules.umbra": "1.0.0",
    44.     "com.unity.modules.unityanalytics": "1.0.0",
    45.     "com.unity.modules.unitywebrequest": "1.0.0",
    46.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    47.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    48.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    49.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    50.     "com.unity.modules.vehicles": "1.0.0",
    51.     "com.unity.modules.video": "1.0.0",
    52.     "com.unity.modules.vr": "1.0.0",
    53.     "com.unity.modules.wind": "1.0.0",
    54.     "com.unity.modules.xr": "1.0.0"
    55.   }
    56. }
    57.  
     
  4. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    I didn't see the searcher package you mentioned in the manifest?

    I try to run
    openupm -r https://packages.unity.com --no-upstream view <package-name>
    on all the dependencies except those com.unity.modules.* packages (which ship with Unity binary). No luck, I can not find the com.unity.searcher package as the dependencies for these packages. See the attachment.

    I agree that the lock file is necessary to solve the issue.
     

    Attached Files:

    • 1.txt
      File size:
      12.3 KB
      Views:
      477
  5. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    That's exactly what I am trying to convey here: Another package depends on it, but why could it not update it automatically, when it's not even included in my manifest (which should lock the version down)?

    You can find the docs here: https://docs.unity3d.com/Packages/com.unity.searcher@4.0/manual/index.html
     
  6. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    I imported the manifest.json
    • The com.unity.search is not in manifest.json.
    • The com.unity.search folder exists in Library/PackageCache folder, so it must be an indirect dependency.
    • The com.unity.search entry doesn't appear in the list of Package Manager UI (filters: All packages, Show dependencies on, Show preview pacakges on). It seems by design, the depended packages won't get flatten in the package manager list. The only way to see depended packages is that you have to know the source package.
    More investigations

    Code (csharp):
    1. $ fgrep com.unity.searcher . -rin
    2. ./com.unity.build@0.1.0-preview.1/package.json:18:    "com.unity.searcher": "4.0.9",
    3.  
    4. fgrep com.unity.build. -rin
    5. ./com.unity.entities@0.4.0-preview.10/package.json:8:    "com.unity.build": "0.1.0-preview.1",
    6.  
    Dependency flow: com.unity.entities => com.unity.build => com.unity.searcher

    But only com.unity.build is listed in the detail page as dependencies.
    upload_2019-12-27_1-55-11.png

    - The com.unity.searcher should be list in the detail page as dependencies. No matter how many layer the relationship it is.
    - The packager manager should upgrade com.unity.searcher if com.unity.build requires a higher version. Based on the the post author. It seems a bug here.

    Workaround - delete the com.unity.search folder from Library/PackageCache folder, and let unity resolves it.
     
    spaceemotion likes this.