Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive handling of optional dependencies #174

Open
dragonchaser opened this issue Jun 23, 2021 · 1 comment
Open

Recursive handling of optional dependencies #174

dragonchaser opened this issue Jun 23, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dragonchaser
Copy link
Contributor

When we deal with the optional dependencies, atm the user is being asked which ones to install.
There are scenarios where there could be optional 2nd, 3rd... n-th level optional dependencies.
Currently those are ignored. My proposal would be to solve the tree several times, workflow:

  1. Have the user select optional dependencies for the current package
  2. Resolve for this tree
  3. If the shared- or optional-dependencies have optional dependencies of their own GOTO 1 and repeat until the whole tree is resolved, similar on what zypper does when running zypper dup
@dragonchaser dragonchaser added the enhancement New feature or request label Jun 23, 2021
@viccuad
Copy link
Member

viccuad commented Jun 23, 2021

Another option instead of recursively finding optional dependencies:

  1. Solve once, tagging the packages that are pulled in as optional with an p.IsOnlyOptionalToSomeOtherPackage = true.
  2. List those optional packages and ask the user on which ones they would like to install.
  3. Promote the ones wanted to normal package dependencies.
  4. Solve again.

Resolving recursively means that we would need to detect loops (which can be bigger than the amount of packages), prune, etc, and basically we would be reimplementing the sat solver. Hence, better if we don't do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants