We are caching manifest JSONs to speed up loading. It can happen that we cached a manifest with an older SwiftPM version and have to load the manifest from JSON with a newer SwiftPM version. With the first traits PR we made the new fields non-optional. This led to failures when loading the manifest from the cache https://github.com/apple/swift-package-manager/pull/7680.
Modification
This PR makes the fields optional and we default to empty sets after loading deserialization.
Motivation
We are caching manifest JSONs to speed up loading. It can happen that we cached a manifest with an older SwiftPM version and have to load the manifest from JSON with a newer SwiftPM version. With the first traits PR we made the new fields non-optional. This led to failures when loading the manifest from the cache https://github.com/apple/swift-package-manager/pull/7680.
Modification
This PR makes the fields optional and we default to empty sets after loading deserialization.