You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many situations where dependencies may be optional. For example, users may want to only download 1 database driver based on what's in the config.
Currently, this is not possible. If a dependency isn't in the libraries directory, it is downloaded again.
My proposition is to add another field to dependencies.json (and as such Artifact) - "optional": true/false.
The default value should be false. If a dependency is optional, it will only be downloaded on initial loading(or if required transitively).
How should this be implemented?
This idea raises a few complications as to the semantics of implementation:
How do we ensure that optional dependencies are only downloaded once?
If the dependency graph changes, how should this be handled?
How should dependencies be specified as optional in the Gradle plugin?
Hypothetically, if Project depends optionally on someLibrary, how should dependency "ownership" be managed, if at all?
Should PDM be in charge of automatically deleting unused dependencies?
The obvious solution is some sort of storage in the PluginLibraries directory. This might look something like this:
There are many situations where dependencies may be optional. For example, users may want to only download 1 database driver based on what's in the config.
Currently, this is not possible. If a dependency isn't in the libraries directory, it is downloaded again.
My proposition is to add another field to
dependencies.json
(and as suchArtifact
) -"optional": true/false
.The default value should be false. If a dependency is optional, it will only be downloaded on initial loading(or if required transitively).
How should this be implemented?
This idea raises a few complications as to the semantics of implementation:
Project
depends optionally onsomeLibrary
, how should dependency "ownership" be managed, if at all?The obvious solution is some sort of storage in the PluginLibraries directory. This might look something like this:
If an optional dependency is present in this file, PDM can assume that it has been downloaded, and will not redownload it if not present.
A method should likely be added to
PluginDependencyManager
to force download all dependencies, optional ones included.The text was updated successfully, but these errors were encountered: