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

Add Package Dependencies to index. #1667

Merged
Show file tree
Hide file tree
Changes from 160 commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
9c72b02
first tests for show depenencies feature
fzanollo Jun 4, 2021
0a81ec5
show dependencies feature for show, install, need to change message
fzanollo Jun 4, 2021
b416985
showflow output changed
fzanollo Jun 9, 2021
c848824
install commands shows dependencies as in specs
fzanollo Jun 10, 2021
688cbe5
tests for informing dependencies on commands: show, install, upgrade,…
fzanollo Jun 10, 2021
7b488f1
refactor install flow
fzanollo Jun 11, 2021
c8d02ea
change import command from install flow (install multiple)
fzanollo Jun 11, 2021
72fd209
import shows all dependencies together
fzanollo Jun 11, 2021
d6d0c53
show dependencies for validate and uninstall
fzanollo Jun 11, 2021
d3063f2
tests for validate and uninstall
fzanollo Jun 11, 2021
9d05f6f
create show dependencies exp feature
fzanollo Jun 12, 2021
e3ccc8e
test for validate command
fzanollo Jun 14, 2021
44fe9e2
put functionality under experimental feature check
fzanollo Jun 14, 2021
a69b930
enable show dep experimental feature on unit test cases
fzanollo Jun 14, 2021
8bb3aa1
change experimental feature name
fzanollo Jun 15, 2021
9737ae1
remove info stream characters on testcase
fzanollo Jun 15, 2021
49c7fea
move check for exp feature inside report function, create new Depende…
fzanollo Jun 15, 2021
74d29ff
DependenciesFlow header and cpp inside Workflow
fzanollo Jun 15, 2021
b7590c3
–change representation of Dependency, create DependencyType and Depen…
fzanollo Jun 18, 2021
b04225a
dependencies context data is of type DependencyList (not optional)
fzanollo Jun 18, 2021
2a620d8
fix spelling errors
fzanollo Jun 18, 2021
40e05b4
ApplyTo function, can receibe a lambda function to apply on specific …
fzanollo Jun 18, 2021
d8c411f
localize user strings, code style changes, validate report dependenci…
fzanollo Jun 22, 2021
9f3961a
change uninstall flow (gets dependencies from package version), make …
fzanollo Jun 22, 2021
1c6347f
add missing report dep on upgrade
fzanollo Jun 22, 2021
c785b14
Update src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw
fzanollo Jun 23, 2021
0a31f79
compare id with ICU case insensitive
fzanollo Jun 23, 2021
af7b09c
move dependencies related functions to DependenciesFlow, ReportDepend…
fzanollo Jun 23, 2021
8fce81d
TODO to get dependencies on uninstall context, remove testcase for no…
fzanollo Jun 23, 2021
af036e4
wfIds not temporary
fzanollo Jun 23, 2021
3388ea7
DependencyList Add function checks for existence and updates min vers…
fzanollo Jun 23, 2021
f07fdc6
root dependencies are used when installer are not present, otherwise …
fzanollo Jun 24, 2021
5eb6270
add tests names to spelling expect
fzanollo Jun 24, 2021
c8e9e27
merge commits from master
fzanollo Jun 24, 2021
0bbe093
style and details
fzanollo Jun 24, 2021
f0f3676
fix merge conflicts
fzanollo Jun 24, 2021
dd03b85
spellcheck exception
fzanollo Jun 24, 2021
2985cd5
detail when adding dep
fzanollo Jun 28, 2021
021e326
proto
fzanollo Jun 29, 2021
4e623d4
divide identity report and installation disclaimer from actual instal…
fzanollo Jun 29, 2021
8f39bd6
Merge branch 'showDependenciesFeature' into dependencyGraph
fzanollo Jun 30, 2021
160242b
proto tests
fzanollo Jul 6, 2021
06ddcd6
testing
fzanollo Jul 7, 2021
e6d7b82
questions
fzanollo Jul 8, 2021
62ef1c7
test for dependency graph and fixes
fzanollo Jul 12, 2021
0ed66ee
check loop logic change
fzanollo Jul 12, 2021
6eb87bf
const & dep graph
fzanollo Jul 12, 2021
d69b3e3
with installation order
fzanollo Jul 12, 2021
b67708c
two more tests
fzanollo Jul 12, 2021
d5f6050
change map key to Dependency (missing min version check)
fzanollo Jul 12, 2021
c737c8d
Dependency implements operand<
fzanollo Jul 13, 2021
087dd8d
Dependency.MinVersion type is AppInstaller::Utility::Version
fzanollo Jul 13, 2021
46d9d0b
choose installer using ManifestComparator
fzanollo Jul 13, 2021
c82f234
getting composite source
fzanollo Jul 14, 2021
aebac6b
Drop const from the returned type of GetSource
JohnMcPMS Jul 14, 2021
3bac9ab
add check for min version
fzanollo Jul 14, 2021
0e1fc7f
Merge branch 'master' into dependencyGraph
fzanollo Jul 14, 2021
3ebfb65
Merge remote-tracking branch 'john/dropconst' into dependencyGraph
fzanollo Jul 14, 2021
da52d81
spelling
fzanollo Jul 15, 2021
0a8f069
add dependencies source
fzanollo Jul 15, 2021
d70c55d
new parameter dependency source, open source can set up both: source …
fzanollo Jul 15, 2021
2e6f29f
spelling
fzanollo Jul 15, 2021
9d39e48
DependencyGraph struct, manages only node/adjacent addition, loop check
fzanollo Jul 16, 2021
00489c6
OpenSource() missing
fzanollo Jul 16, 2021
572c2bf
add adjacents to spellchecker
fzanollo Jul 16, 2021
70978ee
graph logic is ok, installer selection and test source settings needs…
fzanollo Jul 19, 2021
743ca96
dependency-source argument
fzanollo Jul 19, 2021
edde7c0
typo
fzanollo Jul 19, 2021
25f30de
DependencyGraph receives function to search for dependencies, auto-bu…
fzanollo Jul 21, 2021
ef3e6a0
dependency table, create with id
fzanollo Jul 22, 2021
e371668
dependency graph logic moved to manifest common
fzanollo Jul 23, 2021
e6c00d6
refactor
fzanollo Jul 26, 2021
7b4238a
break InstallMultiple workflow into two
fzanollo Jul 27, 2021
a05f384
SelectInstallerFromMetadata does not receive context
fzanollo Jul 28, 2021
4a1aec8
leaving workflow to work as in report dependencies, with the addition…
fzanollo Jul 28, 2021
29bc5fd
move dependencies to context data
fzanollo Jul 28, 2021
48fbb52
dependency graph + installation, all tests passed
fzanollo Jul 29, 2021
43099ed
information detail, delete temp folder
fzanollo Jul 29, 2021
8eede60
merge with master
fzanollo Aug 3, 2021
70cc93e
Merge branch 'showDependenciesFeature' into dependencyGraph
fzanollo Aug 3, 2021
40abbda
more testing for dependencies on install command
fzanollo Aug 5, 2021
e8b4e6a
valid min version test
fzanollo Aug 6, 2021
cadeaa8
typo
fzanollo Aug 6, 2021
eb91317
Merge branch 'master' into showDependenciesFeature
fzanollo Aug 6, 2021
622d39c
Merge branch 'showDependenciesFeature' into dependencyGraph
fzanollo Aug 6, 2021
d67fabd
Merged from master
Sep 30, 2021
d9f41c8
temp stash
Oct 1, 2021
1bd88aa
temp stash
Oct 1, 2021
609f791
Fixed merge errors
Oct 1, 2021
fddc0ae
Merge branch 'master' of https://github.com/hackean-msft/winget-cli i…
Oct 5, 2021
ed7e390
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Oct 5, 2021
87b9e10
More cleanup
Oct 5, 2021
bfa6358
temp stash
Oct 11, 2021
4f67502
Removed prompt for failed dependencies
Oct 11, 2021
bfd8c47
Removed declarations for dependencies table
Oct 11, 2021
a24cff0
Spell check fix
Oct 11, 2021
851bda6
Merged and fixed merge conflicts
Oct 11, 2021
9e9b32d
dependency implementation v1
Oct 12, 2021
5f6c435
In case of fire, push
Oct 13, 2021
68e9c53
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Oct 14, 2021
632e01f
WingetUtil changes done checkpoint1
Oct 16, 2021
ea5dc4f
Fixed spellcheck error
Oct 16, 2021
212ffa6
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Oct 16, 2021
4d4af06
Addressed pr comments.
Oct 19, 2021
681d88c
Addressed PR comments 2
Oct 19, 2021
1210a5f
Code cleanup
Oct 20, 2021
5b6a4fb
Merge branch 'master' into dependencyGraph
hackean-msft Oct 20, 2021
e2e5f61
Fixed spell check error
Oct 20, 2021
ee9ea0b
Merge branch 'dependencyGraph' of https://github.com/fzanollo/winget-…
Oct 20, 2021
160c4c6
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Oct 20, 2021
ad46ffe
Refactored DependencyGraph
Oct 22, 2021
2a247bd
Fixed typos
Oct 23, 2021
adf17ba
Merge branch 'dependencyGraph' of https://github.com/fzanollo/winget-…
Oct 23, 2021
6e70a75
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Oct 23, 2021
520beaf
Fixed typo
Oct 23, 2021
b5788b9
Code refactor and typo fix
Oct 23, 2021
c5f7c7d
Merge branch 'dependencyGraph' of https://github.com/fzanollo/winget-…
Oct 24, 2021
cf4fdbb
throw exception when package is dependency
Oct 25, 2021
f700655
Bug fix
Oct 26, 2021
cf6cc39
Fixed typo
Oct 26, 2021
5632e8f
pulled and fixed merge conflicts
Nov 2, 2021
97e833b
Error messages
Nov 2, 2021
26cf6b2
Replaced file path for pointer for manifest validation.
Nov 2, 2021
99b8d38
Fixed bug
Nov 2, 2021
4ad198e
Fixed spellcheck error
Nov 2, 2021
0d38185
MultiManifestPackageHasDependencies error message
Nov 2, 2021
25fd69d
Code refactor
Nov 2, 2021
316b526
Moved to 1.4 schema
Nov 7, 2021
8532794
Moved to schema 1.4
Nov 8, 2021
e04433a
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Nov 8, 2021
adae9d8
Moved dependencies validation from index
Nov 8, 2021
849ef91
Moved validation out of index
Nov 8, 2021
31caabf
Adding error for missing package ids
Nov 8, 2021
8b0b261
throw when manifest id not found when adding dependencies
Nov 8, 2021
050ebf4
Addressed PR comments
Nov 11, 2021
8746c1d
Removed duplicate interface file
Nov 11, 2021
07359f3
Code cleanup
Nov 11, 2021
5dc5c5e
Using single api for addition and deletion operation
Nov 11, 2021
a7d8e33
Moved validation out of dependencies table
Nov 13, 2021
1969b77
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Nov 13, 2021
c2e1c44
Fixed spell check errors
Nov 13, 2021
cdcf839
Code refactor
Nov 14, 2021
62e5c54
update flag value
Nov 15, 2021
cc56df9
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Nov 17, 2021
dd7c4b3
Created a new enum for validation manifest dependencies option
Nov 17, 2021
e043e0d
Code refactor
Nov 18, 2021
5449de6
create dependencies save point fix.
Nov 18, 2021
2dad0a6
Refactored Insert Depedencies function
Nov 18, 2021
c043426
cleanup
Nov 18, 2021
cab0dbc
more cleanup
Nov 18, 2021
77ee5da
return set from get dependencies
Nov 18, 2021
284e434
Addressed PR comments
Nov 19, 2021
c1ac266
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Nov 19, 2021
44529e7
Addressed PR comments
Nov 19, 2021
1d812bd
Tabs vs spaces
Nov 19, 2021
c503e3a
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Nov 29, 2021
66b8d14
Addressed PR comments
Nov 29, 2021
cff9dc1
More tests
Nov 30, 2021
4d1a974
Code refactor
Nov 30, 2021
5b2c0ea
Addressed PR comments
Nov 30, 2021
f49a2e2
Merge branch 'master' of https://github.com/microsoft/winget-cli into…
Dec 1, 2021
8a69efc
Using initializer list in place of vector
Dec 1, 2021
6b8d404
Fixed bugs
Dec 1, 2021
2131764
Code refactor
Dec 1, 2021
73f5f68
Implemented not needed check for min version in dependencies table
Dec 2, 2021
8423300
Delete versions if there are not referenced
Dec 3, 2021
beae35a
Fixed spellcheck error
Dec 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions src/AppInstallerCLITests/DependenciesTestSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
#include "pch.h"
#include "TestSource.h"
#include "TestCommon.h"
#include "AppInstallerVersions.h"
#include <Public/winget/RepositorySource.h>
#include <winget/ManifestYamlParser.h>

using namespace AppInstaller::Repository;
using namespace AppInstaller::Manifest;
using namespace AppInstaller::Utility;

namespace TestCommon
{
Expand All @@ -23,6 +25,8 @@ namespace TestCommon
installer.ProductId = input;
installer.Dependencies.Clear();

string_t defaultFakeVersion("0.0.1-defaultFakeVersion");

if (input == "withoutInstallers")
{
manifest.Installers.clear();
Expand Down Expand Up @@ -50,32 +54,32 @@ namespace TestCommon
//-- predefined
if (input == "C")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "B"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "B", defaultFakeVersion));
}
if (input == "D")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "E"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "E", defaultFakeVersion));
}
if (input == "E")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "D"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "D", defaultFakeVersion));
}
if (input == "F")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "B"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "B", defaultFakeVersion));
}
if (input == "G")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "C"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "C", defaultFakeVersion));
}
if (input == "H")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "G"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "B"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "G", defaultFakeVersion));
installer.Dependencies.Add(Dependency(DependencyType::Package, "B", defaultFakeVersion));
}
if (input == "installed1")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "installed1Dep"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "installed1Dep", defaultFakeVersion));
}
if (input == "minVersion1.0")
{
Expand All @@ -95,30 +99,30 @@ namespace TestCommon
// depends on test
if (input == "StackOrderIsOk")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "C"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "C", defaultFakeVersion));
}
if (input == "NeedsToInstallBFirst")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "B"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "C"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "B", defaultFakeVersion));
installer.Dependencies.Add(Dependency(DependencyType::Package, "C", defaultFakeVersion));
}
if (input == "EasyToSeeLoop")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "D"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "D", defaultFakeVersion));
}
if (input == "DependencyAlreadyInStackButNoLoop")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "C"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "F"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "C", defaultFakeVersion));
installer.Dependencies.Add(Dependency(DependencyType::Package, "F", defaultFakeVersion));
}
if (input == "PathBetweenBranchesButNoLoop")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "C"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "H"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "C", defaultFakeVersion));
installer.Dependencies.Add(Dependency(DependencyType::Package, "H", defaultFakeVersion));
}
if (input == "DependenciesInstalled")
{
installer.Dependencies.Add(Dependency(DependencyType::Package, "installed1"));
installer.Dependencies.Add(Dependency(DependencyType::Package, "installed1", defaultFakeVersion));
}
if (input == "DependenciesValidMinVersions")
{
Expand Down
Loading