Skip to content

[WinGetUtil] Schema pattern validation rejects values ending in a line break since 1.30 (VS 2026 toolset) #6592

Open

Description

Summary

Starting with WinGetUtil 1.30.180-preview, a manifest whose pattern-constrained field ends with a line break fails schema validation. The same manifest validates with 1.29.190-preview. In YAML this happens with block scalars that use the default "clip" chomping (> or |), which keep one trailing line break by spec. The manifest is valid YAML and is already merged in winget-pkgs:
manifests/w/WaveMetrics/IgorPro/10/10.3.1.30115/WaveMetrics.IgorPro.10.installer.yaml

Expected Behavior

The validation result for an unchanged manifest is the same across WinGetUtil 1.29 and 1.30, or the change is called out as an intentional tightening of validation.

Actual Behavior

WinGetCreateManifest (and winget validate) fails with:

Manifest Error: Schema Error. [Schema validation failed.
Error context: <root>[Installers][0][InstallerUrl] Description: Failed to match regex specified by 'pattern' constraint.
...
] File: WaveMetrics.IgorPro.10.installer.yaml

With manifest validation turned off, both versions parse InstallerUrl the same way: the URL followed by \n.

Steps to Reproduce

  1. Create an installer manifest (ManifestVersion 1.12.0) with:
    InstallerUrl: >
      https://www.example.com/setup.exe
  2. Run winget validate --manifest <dir> with winget 1.29.x: validation succeeds.
  3. Run the same with winget 1.30.180-preview: schema error on InstallerUrl.
  4. Change > to >-: validation succeeds on 1.30.

Environment

  • WinGetUtil version: 1.30.180-preview (regressed), 1.29.190-preview (works)
  • Caller: WinGet service rebuild pipeline (WinGetCreateManifest), also reproduces with winget validate
  • OS: Windows 11

Additional Context

  • The schema (manifest.installer.1.12.0.json), the YAML parsing and validation code, and the vcpkg baseline are the same in both versions.
  • The binaries were built with different toolsets: 1.29.190 linked with MSVC 14.44, 1.30.180 with 14.51. That follows the move to windows-2025-vs2026 build agents in Update to use build agents with VS 2026 #6383 (ede092d).
  • MSVC Build Tools 14.50 changed std::regex for LWG-2503 (<regex>: Add multiline option and make non-multiline mode the default STL#5535): in ECMAScript mode $ no longer matches before a line break unless multiline is requested. The Url pattern ^([Hh][Tt][Tt][Pp][Ss]?)://.+$ therefore no longer matches url\n.
  • The new behavior is consistent with ECMA-262 semantics. The concern is that previously accepted manifests now fail without a schema or version change.
  • In winget-pkgs master (44b1adc72bd), this is the only manifest with a clip/keep block scalar on a pattern-constrained field. ProductCode: > in the same file passes because ProductCode has no pattern.

This report was prepared with the help of AI tools. The details have been reviewed, but should be verified by the maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions