Skip to content

Commit 444d230

Browse files
authored
Create #163 - Dependencies.md (#954)
* Create #163 - Dependencies.md * Update #163 - Dependencies.md * Update expect.txt * Update expect.txt
1 parent bf0f199 commit 444d230

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

.github/actions/spelling/expect.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ ctc
7070
Ctx
7171
curated
7272
CYRL
73+
Debian
7374
deigh
7475
deleteifnotneeded
7576
dirs
7677
dnld
78+
dustojnikhummer
7779
dvinns
7880
dw
7981
endian
@@ -87,6 +89,7 @@ execustom
8789
EXEHASH
8890
experimentalfeatures
8991
fd
92+
fedorapeople
9093
fintimes
9194
Fixfor
9295
flargle
@@ -129,13 +132,18 @@ IService
129132
ISettings
130133
ishelp
131134
ISQ
135+
issuecomment
132136
ISVs
133137
itr
134138
IVector
135139
IWeb
136140
IZone
141+
JDKs
142+
jfearn
137143
JObject
138144
jp
145+
jpalardy
146+
JREs
139147
jrsoftware
140148
jsoncpp
141149
kayone
@@ -148,6 +156,7 @@ LATN
148156
ldcase
149157
learnxinyminutes
150158
lhs
159+
libsolv
151160
libyaml
152161
Linq
153162
liv
@@ -180,6 +189,7 @@ mylog
180189
mysilent
181190
mysilentwithprogress
182191
mytool
192+
netlify
183193
Newtonsoft
184194
NOEXPAND
185195
normer
@@ -227,6 +237,7 @@ SARL
227237
schematab
228238
Screenshot
229239
sddl
240+
semver
230241
seof
231242
serializer
232243
setmetadatabymanifestid
@@ -252,6 +263,7 @@ subdir
252263
subkey
253264
superstring
254265
suppy
266+
SUSE
255267
swervy
256268
sysrefcomp
257269
Tagit

doc/specs/#163 - Dependencies.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
author: Demitrius Nelon denelon/[email protected]
3+
created on: 2021-05-06
4+
last updated: 2021-05-06
5+
issue id: 163
6+
---
7+
8+
# Dependencies
9+
10+
"For [#163](https://github.com/microsoft/winget-cli/issues/163)"
11+
12+
## Abstract
13+
14+
Several packages require other packages as dependencies. The Windows Package Manager should be able to support declared dependencies. In the best case scenario the Windows Package Manager should be able to install any necessary dependencies a package needs. In the worst case scenario the Windows Package manger should be able to inform a user about any required dependencies not able to be installed automatically.
15+
16+
## Inspiration
17+
18+
Many other package mangers have this capability. It's frustrating to be required to figure out what other dependencies are needed for a package, and have to deal with their dependencies as well.
19+
20+
## Solution Design
21+
22+
The Windows Package Manager manifest v1.0 schema has provided keys for four different types of dependencies.
23+
24+
@Conan-Kudo [suggested](https://github.com/microsoft/winget-cli/issues/163#issuecomment-631091560) evaluating [openSUSE/libsolv](https://github.com/openSUSE/libsolv).
25+
26+
Four different types of dependencies have been declared in the [v1.0 manifest schemas](https://github.com/microsoft/winget-cli/blob/master/schemas/JSON/manifests/v1.0.0/).
27+
28+
* Windows Features
29+
* Windows Libraries
30+
* Package Dependencies (same source)
31+
* External Dependencies
32+
33+
Each of these dependencies must be declared in the manifest. In the case of MSIX packages, the dependencies are not required to be declared in the manifest.
34+
35+
The implementation for dependency support should initially be enabled as an experimental feature.
36+
37+
Each of the dependency types should be handled the same way for the minimum viable approach. A warning should be presented to the user with the list of dependencies specified in the manifest.
38+
```
39+
warning: This package requires the following dependencies:
40+
<dependency type>: <dependency>
41+
Do you have these dependencies installed [y/n]?
42+
```
43+
If the user chooses "yes", the installation will proceed.
44+
45+
Note: This is essentially the complete implementation for External Dependencies. It is not required at this stage to deal with nested dependencies.
46+
47+
In addition, the consumes and provides concept is not in scope with this implementation.
48+
49+
### Windows Features
50+
These include items like .NET Frameworks, Internet Information Services, and Windows Subsystem for Linux. In some cases, turning these features on may require a reboot.
51+
52+
### Windows Libraries
53+
These include items like Microsoft.WinJS or Visual C++ Redistributable libraries.
54+
55+
### Package Dependencies
56+
These include other packages. The restriction on these dependencies is that they come from the same source for the package to be installed. These include programming languages, runtime environments, or drivers.
57+
58+
### External Dependencies
59+
These include dependencies from outside of the source the original package is distributed. In some cases suitable items may exist in the same source, but for licensing or personal preference, no explicit package should be required. One example is Java. Many vendors offer JREs and JDKs so it may be more reasonable to have a user informed, and allow the user to confirm the presence of a dependency.
60+
61+
62+
63+
## UI/UX Design
64+
65+
@dustojnikhummer [suggested](https://github.com/microsoft/winget-cli/issues/163#issuecomment-633901489) a syntax like:
66+
67+
`winget install package -y` to install all dependencies and then the package and `winget install package` to prompt the user for each required dependency before installing it.
68+
69+
## Capabilities
70+
71+
Several different package installers exist and treat dependencies differently.
72+
73+
MSIX installers have an internal mechanism to identify dependencies.
74+
75+
MSI and .exe installers may include dependencies.
76+
77+
### Accessibility
78+
79+
The Windows Package Manager has been built in such a way that screen readers will still provide audible output as the command is executed keeping the user informed of progress, warnings, and errors. This should have no direct impact on accessibility.
80+
81+
### Security
82+
83+
There should be no security impact directly, although we must remember that different sources may not guarantee the safety of packages. The Windows Package Manager community repository performs static and dynamic analysis, and in some cases additional manual validation before accepting a package.
84+
85+
### Reliability
86+
87+
The Windows Package Manager community repository does not directly host packages that may be called as dependencies. These packages may be removed or become unavailable if the site they are hosted on encounters a failure (or no network access is available).
88+
89+
### Compatibility
90+
91+
No current implementation for dependencies exists, so no compatibility issues are expected to occur as a result of dependency support.
92+
93+
### Performance, Power, and Efficiency
94+
95+
The time needed to download and install a package and it's dependencies is directly related to network speed and the size of any packages.
96+
97+
## Potential Issues
98+
99+
Not all dependencies are identified using [semantic versioning](https://semver.org/). This may cause complications for packages depending on a range of versions. It is possible a breaking change is introduced in a newer version of a dependency the Windows Package Manager cannot heuristically reason about.
100+
101+
Some systems have limited storage, and may not have suitable space to install a package and all of it's dependencies.
102+
103+
## Future considerations
104+
105+
The import command may be able to take advantage of determining all dependencies for all packages, and avoid repeatedly installing the same dependencies multiple times.
106+
107+
## Resources
108+
109+
[RPM Dependencies](https://jfearn.fedorapeople.org/en-US/RPM/4/html/RPM_Guide/ch-advanced-packaging.html)
110+
111+
[Node.js package.json configuration](https://docs.microsoft.com/en-us/visualstudio/javascript/configure-packages-with-package-json?view=vs-2019#:~:text=package.json%20configuration%201%20In%20a%20major%20version%20update%2C,fixes%20are%20included.%20Bug%20fixes%20are%20always%20backwards-compatible.)
112+
113+
[R Package metadata](https://r-pkgs.org/description.html)
114+
115+
[Debian package relationships](https://www.debian.org/doc/debian-policy/ch-relationships.html)
116+
117+
[Brew Untangling Dependencies](https://blog.jpalardy.com/posts/untangling-your-homebrew-dependencies/)
118+
119+
[Scoop Dependencies](https://scoop.netlify.app/concepts/#dependencies)
120+
121+
[Chocolatey Create Packages](https://docs.chocolatey.org/en-us/create/create-packages)

0 commit comments

Comments
 (0)