The contracts/Solidity code is using Diamond Storage correctly.
There are a few structs being used directly in other structs that are stored in contract storage. Inner structs cannot be extended in future upgrades. This is okay if it is known that they will never need to be extended in the future.
If desired there is a technique that can be used to make inner structs extendable in future upgrades. The technique is to put the inner struct in a mapping within the outer struct.
The contracts/Solidity code is using Diamond Storage correctly.
There are a few structs being used directly in other structs that are stored in contract storage. Inner structs cannot be extended in future upgrades. This is okay if it is known that they will never need to be extended in the future.
For example the Voucher struct here: https://github.com/bosonprotocol/boson-protocol-contracts/blob/9639040566d9a6b355355009a2a6d5ef7be9327e/contracts/domain/BosonTypes.sol#L158
Is used directly in the Exchange struct here: https://github.com/bosonprotocol/boson-protocol-contracts/blob/9639040566d9a6b355355009a2a6d5ef7be9327e/contracts/domain/BosonTypes.sol#L149
If desired there is a technique that can be used to make inner structs extendable in future upgrades. The technique is to put the inner struct in a mapping within the outer struct.
For example see
voucher
in this code:And here is the change:
A constant can be defined that is used to access any struct that uses this trick: