Search Unity

Dependencies not visible?

Discussion in 'Package Manager' started by col000r, Jan 31, 2019.

  1. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    699
    When I install a package that has dependencies, the dependencies become available, but they don't show up in the Packages folder in the project pane. Can you please make them show up as well?
     
  2. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @col000r ,

    If you need these packages to show up in the project folder, It means your project *depends* on them. You need to explicitly add the dependencies to your project.

    Regards,

    Pascal
     
  3. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    699
    It's all good in 2019.1, there the dependent packages that come along with a package that I install via the package manager do show up in the project pane as well! But they still don't show up as installed in the Package Manager, which would be a nice last touch... ;)
     
  4. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @okcompute_unity While 2019.1 PM is improvement on this, would still be nice for PM to actually list all installed packages regardless.

    Here's a quick mockup how it could work:

    you could also put the dependencies with totally different color than gray, like use yellow, blue etc and you could also change the check icon at the end to something different to indicate this was installed as dependency automatically and have it change to regular if user manually upgrades that component.

    This would make it way more obvious to the user for what all packages are currently in project.
     
    ceebeee likes this.
  5. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hello @rizu,

    Thank you for the feedback. May I ask for what use case you would need to view transitive dependencies?

    I think it would be nice to show transitive dependencies for debugging dependencies resolution issues. For example, there are probably situations where a transitive package could generate warning/errors and you would like to know where it comes from.

    But in theory and in general, you should not care about transitive dependencies. It is implementation details of a package. For example, transitive dependencies can be changed/removed/added just by changing the version of a root package dependency.

    Please expose your use case so we can take into account :)

    Thanks again!

    Pascal
     
  6. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    1) When you got a thing that has ton of these, it's really hard to keep in track what all was automatically installed (you have to browse all installed components manually to see this instead of looking at the in project list and see that all at one glance.

    2) Sometimes we get updates/bugfix to some individual package that was in a dependency and it would be nice to just hit update for that instead of going to the full all packages list and look for new version. Right now you don't get ANY indication if there's an update to a package that has been only installed through dependency requirement.

    3) It would clear out confusion for new users on how things get magically installed (2019.1 PM change helps a bit here but it's not intuitive because of #1)

    Btw, what happens if you have two packages that depend on different version of package that hasn't been manually installed, how are these sorted? Does the newest listed dependency always win, etc?
     
  7. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    1) Not sure I get what you mean. But this point relates to my argument that you should not have to take that much care for transitive dependencies. If you had a concrete example that would be helpful.

    2) In today's context, viewing the list of transitive dependencies would not help you. You would still have to wait for the dependent package author to update his package dependency with the updated package. Even if we would show the transitive dependencies, you would have to *add* this package in your project as a root dependency to get the updated version. That said, this is a use case that we want to tackle. The goal is to bubble up package bug fixes into projects without requiring package authors to update their package dependencies first. We want to speed up the time it takes for a leaf package (ex: mathematics package) bug fix to propagate. Waiting from all packages to update their dependencies would take too much time to make it available in user projects. I don't have an ETA yet.

    3) The goal of the Package Manager *is* to do magic :). Otherwise, we would have implemented the *dependencies* feature. As I said, you should not have to care what are the dependencies of a package. Though, an advanced UI to help users figure out issues or corner case is where this UI will become helpful.

    The conflict resolution system will always opt for the package closest to the root of the dependency graph. In other words, if you use package A version 1.0.0 in your project and some package wants version 1.2.0, the system will select version 1.0.0.

    When a conflict is at the same level in the dependency graph, the highest version of two conflicting versions is always selected. If package A depends on package C 1.0.0 and package B depends on package C 1.2.0, package C 1.2.0 will be selected.

    Hope it helps,

    Pascal
     
    rz_0lento likes this.
  8. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I mean that if you install certain packages today, you get tons of dependencies you may have not realized. For example if you install Hybrid Renderer today, PM shows this:


    but in the background the Entities dependency installs also all this, all behind the back of the user:

    Since you don't see these in Package Manager, it's not clear at all what have been installed unless you peek into Project views packages (which also lists other packages on top of these). It can be really confusing for the users how these work or what to fix if some of these break.

    Also worth noting that we also have packages like Visual Effect Graph that don't have any dependencies at all but will fail to run as it actually depends on HDRP right now. This is just one example though, there are plenty others.

    But this is exactly how we fix issues like this today. We have to install the bugfixed package manually anyway. If the PM actually showed there was update, it would make this easier (with a risk of course of getting API breaking changes from the newer version). All in all, I think you should add new variable to the package.json to describe the packages own API version (like literally API number for that specific library). If that hasn't been changed, you can upgrade with minimal risk.

    This is what I dislike the most. I don't like UX decisions that hide valuable information that would still make a lot of sense for users who know a bit what they are doing. I also get the urge to dummify the UI to a point where people can't make mistakes by accident but I believe these both can exist at the same time (you could just add toggle like you now have for preview packages etc). In this case, bringing "magic" will make it harder for users to understand how it even works, and using things blindly with guidelines isn't going to do you any favors when things break and you actually have to be able to sort the thing out on your own (it just raises the bar noticeably).
     
    Last edited: Feb 4, 2019
  9. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Thinking about this more, I think the goal from Unity is to do something similar to VS2017 installer does but I'd actually prefer the approach they do there. For example you could like ask what feats user wants to use and install all the relevant packages on behalf of the user but also show and allow modifications to the actual items for power users.

    Right now the current solution is kind of a mix of this with dependencies and also lack of dependencies where user can't just pick the feats randomly right now: you still need to be aware of some packages dependencies (like that Visual Effect Graph relying on HDRP). Current approach is messy in a way that it hide the info from power users but isn't fully proofed for new users either.

    Also current way for indicating that some package isn't installed (this is what PM does now in All packages view) even when it's installed as dependency is one sure way to add more confusion.
     
  10. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    I'd like to think i'm in control of my own project, what is installed and not installed. I am fine with things being installed as dependencies, but I'd still like to know exactly what has bee installed into my project. For one thing, I may not even be using Post processing stack, and yet it's being installed without my knowledge, and I want to be aware of that fact. Hiding it's existence doesn't benefit me as a user at all.
     
    EvOne and rz_0lento like this.
  11. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    @rizu @ceebeeze We are not planning to hide things from you. It may have not been clear in all the text I wrote above but here it is: We will implement a way for you to see all dependencies, transitive and root. I just don't know when.

    As stated above, we understand the value for debugging and or for users that need a better understanding of what is in there project. The point I wanted to convey is, in theory, you don't need to be shown these dependencies since you have not explicitly ask for them. I did not a good job on that front so you can just disregard this. I was mostly curious to if there was other use cases or issues that I did not have on my radar.

    Regards,

    Pascal
     
    ceebeee and rz_0lento like this.
  12. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    That's fair. Glad to hear it's being addressed.