[X] I have verified this is the correct repository for opening this issue.
[X] I have verified no other issues exist related to my request.
Is Your Feature Request Related To A Problem? Please describe.
When a package has dependencies and we are installing these, the dependencies are looked up by querying all of the available versions for those dependencies.
This causes unnecessary length of time and issues in some cases.
An additional problem is that when the package being installed has a dependency on a package in the moderation queue or Chocolatey Community Repository, where the package attempted to be installed is approved/exempted, but the dependency has not been approved/exempted, the installation will fail because of this. Even when a specific version is attempted.
Describe The Solution. Why is it needed?
We should update the dependency lookup to be a bit smarter.
When a version range with an inclusive upper limit is specified, then attempt to look up this exact version first. This would cover both inclusive upper limits, and exact version ranges so we do not have to do additional larger queries.
If there is no upper limit then we should attempt to look up the absolute latest version of the package (stable or pre-release dependending on configuration).
When an exclusive upper limit is used, or if the previous two checks fails it should fall back to the grabbing all the available versions of the dependency.
Checklist
Is Your Feature Request Related To A Problem? Please describe.
When a package has dependencies and we are installing these, the dependencies are looked up by querying all of the available versions for those dependencies.
This causes unnecessary length of time and issues in some cases.
An additional problem is that when the package being installed has a dependency on a package in the moderation queue or Chocolatey Community Repository, where the package attempted to be installed is approved/exempted, but the dependency has not been approved/exempted, the installation will fail because of this. Even when a specific version is attempted.
Describe The Solution. Why is it needed?
We should update the dependency lookup to be a bit smarter.
When a version range with an inclusive upper limit is specified, then attempt to look up this exact version first. This would cover both inclusive upper limits, and exact version ranges so we do not have to do additional larger queries.
If there is no upper limit then we should attempt to look up the absolute latest version of the package (stable or pre-release dependending on configuration).
When an exclusive upper limit is used, or if the previous two checks fails it should fall back to the grabbing all the available versions of the dependency.
Additional Context
N/A
Related Issues
No response