-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Return error codes for dependencies failure #2410
Return error codes for dependencies failure #2410
Conversation
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.h
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.h
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.cpp
Outdated
Show resolved
Hide resolved
{ AppInstaller::Manifest::ManifestError::DuplicateReturnCodeEntry, "Duplicate installer return code found." }, | ||
{ AppInstaller::Manifest::ManifestError::FieldRequireVerifiedPublisher, "Field usage requires verified publishers." }, | ||
{ AppInstaller::Manifest::ManifestError::SingleManifestPackageHasDependencies, "Package has a single manifest and is a dependency of other manifests." }, | ||
{ AppInstaller::Manifest::ManifestError::MultiManifestPackageHasDependencies, "Deleting the manifest will be break the following dependencies." }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ AppInstaller::Manifest::ManifestError::MultiManifestPackageHasDependencies, "Deleting the manifest will be break the following dependencies." }, | |
{ AppInstaller::Manifest::ManifestError::MultiManifestPackageHasDependencies, "Deleting the manifest will break the following dependencies." }, | |
{ AppInstaller::Manifest::ManifestError::RequiredFieldEmpty, "Required field with empty value." }, | ||
{ AppInstaller::Manifest::ManifestError::RequiredFieldMissing, "Required field missing." }, | ||
{ AppInstaller::Manifest::ManifestError::InvalidFieldValue, "Invalid field value." }, | ||
{ AppInstaller::Manifest::ManifestError::ExeInstallerMissingSilentSwitches, "Silent and SilentWithProgress switches are not specified for InstallerType exe.Please make sure the installer can run unattended." }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ AppInstaller::Manifest::ManifestError::ExeInstallerMissingSilentSwitches, "Silent and SilentWithProgress switches are not specified for InstallerType exe.Please make sure the installer can run unattended." }, | |
{ AppInstaller::Manifest::ManifestError::ExeInstallerMissingSilentSwitches, "Silent and SilentWithProgress switches are not specified for InstallerType 'exe'. Please make sure the installer can run unattended." }, |
{ AppInstaller::Manifest::ManifestError::DuplicateInstallerEntry, "Duplicate installer entry found." }, | ||
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotSupportPackageFamilyName, "The specified installer type does not support PackageFamilyName." }, | ||
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotSupportProductCode, "The specified installer type does not support ProductCode." }, | ||
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotWriteAppsAndFeaturesEntry, "The specified installer type does not write to Apps and Features entry." }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotWriteAppsAndFeaturesEntry, "The specified installer type does not write to Apps and Features entry." }, | |
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotWriteAppsAndFeaturesEntry, "The specified installer type does not write an entry to Apps and Features." }, |
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotSupportPackageFamilyName, "The specified installer type does not support PackageFamilyName." }, | ||
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotSupportProductCode, "The specified installer type does not support ProductCode." }, | ||
{ AppInstaller::Manifest::ManifestError::InstallerTypeDoesNotWriteAppsAndFeaturesEntry, "The specified installer type does not write to Apps and Features entry." }, | ||
{ AppInstaller::Manifest::ManifestError::IncompleteMultiFileManifest, "The multi file manifest is incomplete.A multi file manifest must contain at least version, installer and defaultLocale manifest."}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ AppInstaller::Manifest::ManifestError::IncompleteMultiFileManifest, "The multi file manifest is incomplete.A multi file manifest must contain at least version, installer and defaultLocale manifest."}, | |
{ AppInstaller::Manifest::ManifestError::IncompleteMultiFileManifest, "The multi file manifest is incomplete. A multi file manifest must contain at least a version, installer, and defaultLocale manifest file."}, | |
{ AppInstaller::Manifest::ManifestError::InconsistentMultiFileManifestFieldValue, "The multi file manifest has inconsistent field values." }, | ||
{ AppInstaller::Manifest::ManifestError::DuplicateMultiFileManifestType, "The multi file manifest should contain only one file with the particular ManifestType." }, | ||
{ AppInstaller::Manifest::ManifestError::DuplicateMultiFileManifestLocale, "The multi file manifest contains duplicate PackageLocale." }, | ||
{ AppInstaller::Manifest::ManifestError::UnsupportedMultiFileManifestType, "The multi file manifest should not contain file with the particular ManifestType." }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ AppInstaller::Manifest::ManifestError::UnsupportedMultiFileManifestType, "The multi file manifest should not contain file with the particular ManifestType." }, | |
{ AppInstaller::Manifest::ManifestError::UnsupportedMultiFileManifestType, "The multi file manifest should not contain a file with the particular ManifestType." }, | |
{ AppInstaller::Manifest::ManifestError::InstallerFailedToProcess, "Failed to process installer." }, | ||
{ AppInstaller::Manifest::ManifestError::NoSupportedPlatforms, "No supported platforms." }, | ||
{ AppInstaller::Manifest::ManifestError::ApproximateVersionNotAllowed, "Approximate version not allowed." }, | ||
{ AppInstaller::Manifest::ManifestError::ArpVersionOverlapWithIndex, "DisplayVersion declared in the manifest has overlap with existing DisplayVersion range in the index.Existing DisplayVersion range in index : " }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ AppInstaller::Manifest::ManifestError::ArpVersionOverlapWithIndex, "DisplayVersion declared in the manifest has overlap with existing DisplayVersion range in the index.Existing DisplayVersion range in index : " }, | |
{ AppInstaller::Manifest::ManifestError::ArpVersionOverlapWithIndex, "DisplayVersion declared in the manifest has overlap with existing DisplayVersion range in the index. Existing DisplayVersion range in index : " }, |
… user/akalagbe/surface-dep-errors
Note to other reviewers: The main goal of the change was to get the specifics of the errors out of the function, but I suggested that it be done this way in order to move 1 step closer to actually localizing these messages (and any/all others in common). |
… user/akalagbe/surface-dep-errors
|
||
if (itr != dependenciesErrorMessageMap.end()) | ||
{ | ||
return itr->second; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we ||
together all of the errors that we find?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependencies error are mutually exclusive, Renamed the method name to properly convey its functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think || is more future proof
@hackean-msft this pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing my blocking status for now.
… user/akalagbe/surface-dep-errors
src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj.filters
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidation.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/Rest/Schema/1_0/RestInterface_1_0.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.h
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/PackageDependenciesValidation.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
… user/akalagbe/surface-dep-errors
src/AppInstallerRepositoryCore/PackageDependenciesValidationUtil.h
Outdated
Show resolved
Hide resolved
src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj.filters
Outdated
Show resolved
Hide resolved
Original issues resolved, others have reviewed.
The goal of these change is to allow the WinGetValidateManifestV3 to return dependencies failure as error code for programmatic usage. This prevents the need to parse strings to decode the different failure types associated with dependences.
Changes:
Microsoft Reviewers: Open in CodeFlow