PackageIdentifier - Input does not match the valid format for this field
Brief description of your issue
Hey folks,
When running wingetcreate new and supplying an installer URL from a release on GitHub, then trying to accept the parsed PackageIdentifier name OR typing it in manually, I get the following error:
"Input does not match the valid format pattern for this field".
I did some searching and I'm seeing a ton of packages that have exactly this format of <author>.<package-name>, so I'm not sure what the problem is exactly.
Steps to reproduce
- Run
wingetcreate new - When prompted for InstallerUrls, enter: https://github.com/jdalley/command-palette-toggle-hdr/releases/download/v0.0.1/jdalley.ToggleHDRExtensionforCommandPalette_0.0.1.0_x64__ygjv9tpcda3x6.msix and hit enter (twice).
- Hit enter to accept suggested/parsed value of
jdalley.ToggleHDRExtensionforCommandPaletteor manually typejdalley.ToggleHDRExtensionforCommandPaletteand hit enter. - Get error
Expected behavior
Be allowed to proceed to the next step after entering a correct PackageIdentifier value.
Actual behavior
Not able to proceed to the next step after entering a correct PackageIdentifier value.
Environment
Windows Package Manager Manifest Creator v1.9.4.0
Copyright (c) Microsoft Corporation. All rights reserved.
Operating System: Microsoft Windows NT 10.0.26100.0
System Architecture: X64
Tried on both Warp terminal (Powershell 7.5.1) and Windows Terminal (Powershell 7.5.1)
Update
It turns out I didn't consider the property section length, and the following regex has enlightened me to the fact that the max length per-section is 32 characters. Shortening it does in fact fix this.
https://github.com/microsoft/winget-cli/blob/master/schemas/JSON/manifests/v1.6.0/manifest.singleton.1.6.0.json#L8
It turns out I didn't consider the property section length, and the following regex has enlightened me to the fact that the max length per-section is 32 characters. Shortening it does in fact fix this.
Yep, that's not specifically a winget-create issue since it validates based on the WinGet schema. Maybe you can open an issue at winget-cli to possibly relax the character limit in a new schema version?
It turns out I didn't consider the property section length, and the following regex has enlightened me to the fact that the max length per-section is 32 characters. Shortening it does in fact fix this.
Yep, that's not specifically a winget-create issue since it validates based on the WinGet schema. Maybe you can open an issue at winget-cli to possibly relax the character limit in a new schema version?
Oh yeah good point - great suggestion, I've opened one here: https://github.com/microsoft/winget-cli/issues/5498