Custom:oz annotations inside structs

Hi,

Running upgrades-cli on some contracts using ERC7201, meaning the storage is defined as structs.
It seems the script might not be reading annotations inside the structs? Am I annotating wrong?

    /// @custom:storage-location erc7201:story-protocol.RoyaltyModule
    struct RoyaltyModuleStorage {
        /// @custom:oz-renamed-from licensingModule
        address deprecated_licensingModule;
        mapping(address royaltyPolicy => bool isWhitelisted) isWhitelistedRoyaltyPolicy;
        mapping(address token => bool) isWhitelistedRoyaltyToken;
        mapping(address ipId => address royaltyPolicy) royaltyPolicies;
    }
 ✘  contracts/modules/royalty/RoyaltyModule.sol:RoyaltyModule (upgrades from contracts/old/v1.0.0.sol:RoyaltyModule_V1_0_0)

      contracts/modules/royalty/RoyaltyModule.sol:52: Renamed `licensingModule` to `deprecated_licensingModule`

Hi @ethicraul,

Annotations within a struct are not supported at the moment, because Solidity does not expose the NatSpec of struct members.

This is tracked in https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/802 which provides a workaround for structs that are accessed normally. That workaround does not apply for namespaced storage since there is no variable which uses the struct.

You could try using the --unsafeAllowRenames flag in the CLI, as long as your specific variable rename was the only error which was occurring otherwise.