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
The ManifestInfo type deserializes certain sections from Cargo.toml
package.metadata.build-package
package.metadata.build-kit
package.metadata.build-variant
Currently the differences between build-package, build-kit and build-variant is not constrained by an enum. This leads to a lot of "late binding" errors if an expected field is missing. Instead a different type for each of these should be created. For example:
If serde is used correctly with this structure, then missing information will cause an error at deserialization time and get rid of Options and errors downstream when fields are being accessed.
We should create an issue, if we don't have one already, for deserializing these manifest metadata sections with Serde in a validating manner. We should catch these errors earlier.
The
ManifestInfo
type deserializes certain sections from Cargo.tomlpackage.metadata.build-package
package.metadata.build-kit
package.metadata.build-variant
Currently the differences between build-package, build-kit and build-variant is not constrained by an enum. This leads to a lot of "late binding" errors if an expected field is missing. Instead a different type for each of these should be created. For example:
If serde is used correctly with this structure, then missing information will cause an error at deserialization time and get rid of Options and errors downstream when fields are being accessed.
Originally posted by @webern in #271 (comment)
The text was updated successfully, but these errors were encountered: