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

[Bug]: Unable to validate a new package #46097

Closed
svanimpe opened this issue Feb 14, 2022 · 1 comment
Closed

[Bug]: Unable to validate a new package #46097

svanimpe opened this issue Feb 14, 2022 · 1 comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@svanimpe
Copy link

Brief description of your issue

I've created a new package (new version of Swift.Toolchain) using the YamlCreate script. However, I am unable to validate this package.

The command winget validate --manifest Swift.Toolchain.yaml fails saying the multi-file manifest is incomplete.

I've also tried to use the Windows Sandbox as suggested here: https://github.com/microsoft/winget-pkgs/blob/master/doc/tools/YamlCreate.md but the command Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online prints an error saying the feature named Containers-DisposableClientVM is unknown.

Steps to reproduce

Manifest files:

Swift.Toolchain.yaml:

# Created with YamlCreate.ps1 v2.0.7 $debug=NVS1.7-2-1
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.1.0.schema.json

PackageIdentifier: Swift.Toolchain
PackageVersion: 5.5.3
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.1.0

Swift.Toolchain.installer.yaml:

# Created with YamlCreate.ps1 v2.0.7 $debug=NVS1.7-2-1
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.1.0.schema.json

PackageIdentifier: Swift.Toolchain
PackageVersion: 5.5.3
InstallerLocale: en-US
MinimumOSVersion: 10.0.0.0
InstallerType: burn
Scope: machine
UpgradeBehavior: uninstallPrevious
Commands:
- swift
FileExtensions:
- swift
ReleaseDate: 2022-02-09
Installers:
- Architecture: x64
  InstallerUrl: https://download.swift.org/swift-5.5.3-release/windows10/swift-5.5.3-RELEASE/swift-5.5.3-RELEASE-windows10.exe
  InstallerSha256: A545F0404C13D45B8D7CA257C1395FF01938786EA5730E27E570EB0486B7079F
ManifestType: installer
ManifestVersion: 1.1.0

Swift.Toolchain.locale.en-US.yaml:

# Created with YamlCreate.ps1 v2.0.7 $debug=NVS1.7-2-1
# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.1.0.schema.json

PackageIdentifier: Swift.Toolchain
PackageVersion: 5.5.3
PackageLocale: en-US
Publisher: dt.compnerd.org
# PublisherUrl: 
# PublisherSupportUrl: 
# PrivacyUrl: 
Author: Swift Open Source Project
PackageName: Swift
PackageUrl: https://www.swift.org/
License: Apache License 2.0
LicenseUrl: https://github.com/apple/swift/blob/main/LICENSE.txt
Copyright: Copyright (c) Swift Open Source Project
# CopyrightUrl: 
ShortDescription: Swift Toolchain for Windows
# Description: 
Moniker: swift
Tags:
- swift
# Agreements: 
# ReleaseNotes: 
# ReleaseNotesUrl: 
ManifestType: defaultLocale
ManifestVersion: 1.1.0

Expected behavior

I would expect files generated by YamlCreate to validate.

Actual behavior

See above

Environment

Windows Package Manager v1.1.13405
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.493
Package: Microsoft.DesktopAppInstaller v1.16.13405.0
@svanimpe svanimpe added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Feb 14, 2022
@ghost ghost added the Needs-Triage This work item needs to be triaged by a member of the core team. label Feb 14, 2022
@ItzLevvie
Copy link
Contributor

ItzLevvie commented Feb 14, 2022

For WinGet's multi-file manifests, you will need to pass the package's version folder to winget validate --manifest <PATH_TO_VERSION_FOLDER> instead of the YAML files.

For WinGet's singleton manifests, you can either do the above or validate the package's individual YAML file.

YamlCreate.ps1 already automatically validates manifests whenever you create them.

@denelon denelon removed the Needs-Triage This work item needs to be triaged by a member of the core team. label Feb 14, 2022
@denelon denelon closed this as completed Feb 15, 2022
@denelon denelon added this to the 1.7 Packages milestone Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

3 participants