You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The 'platforms' key is not recognized as a child of packs in WorkloadManifest.json #17151
changed the title [-]The 'platforms' key is not recognized in WorkloadManifest.json[/-][+]The 'platforms' key is not recognized as a child of packs in WorkloadManifest.json[/+]on Apr 23, 2021
Per the spec, it's currently only supported at the workload level. We can consider adding it on the pack level as a convenience, which would propagate up to any workloads that included it, just like workloads that extend a platform-restricted workload inherit the restrictions.
I would generally expect most packs to only ever be included directly in one workload, but included transitively in other workloads via the extends workload mechanism. There's also the abstract workload mechanism - for example, you could create a ios-windows-sdk abstract workload that just contains this pack and is platform-restricted, and concrete workloads could extend that instead of including the pack directly.
That said, I'm not sure this is what you want. The platform key will prevent installing the workload on unsupported platforms. If you want the IOS workload to be installable on both Mac and Windows but to only include this pack when installing on Windows, you should:
use platform to restrict the workload to Mac and Windows
for the Windows-only pack, use an alias pack that only contains aliases for Windows
Sorry for the delay, thanks for the breakdown @mhutch. I don't see a need on our end to have platforms supported at the pack level, the suggested alternatives should work fine for us.
Activity
[-]The 'platforms' key is not recognized in WorkloadManifest.json[/-][+]The 'platforms' key is not recognized as a child of packs in WorkloadManifest.json[/+]wli3 commentedon Apr 25, 2021
@mhutch
mhutch commentedon Apr 26, 2021
Per the spec, it's currently only supported at the workload level. We can consider adding it on the pack level as a convenience, which would propagate up to any workloads that included it, just like workloads that extend a platform-restricted workload inherit the restrictions.
I would generally expect most packs to only ever be included directly in one workload, but included transitively in other workloads via the
extendsworkload mechanism. There's also theabstractworkload mechanism - for example, you could create aios-windows-sdkabstract workload that just contains this pack and is platform-restricted, and concrete workloads could extend that instead of including the pack directly.That said, I'm not sure this is what you want. The
platformkey will prevent installing the workload on unsupported platforms. If you want the IOS workload to be installable on both Mac and Windows but to only include this pack when installing on Windows, you should:platformto restrict the workload to Mac and Windowswli3 commentedon May 5, 2021
@pjcollins does that satisfy your question?
wli3 commentedon May 12, 2021
@pjcollins ?
pjcollins commentedon May 12, 2021
Sorry for the delay, thanks for the breakdown @mhutch. I don't see a need on our end to have
platformssupported at the pack level, the suggested alternatives should work fine for us.