Closed AllDmeat closed 1 month ago
I have a smiller problem.
When using the external-codable-protocols
option, the following error is output.
.periphery.yml: invalid key 'external-codable-protocols'
Run it with the --retain-codable-properties
option.
periphery scan --retain-codable-properties
I ran into the same issue and did some digging running through the debugger and found that. It does mention it in the CHANGELOG.md
, but not in the README.md
.
Sorry for not updating the README and causing confusion. This was indeed an intentional change and --retain-codable-properties
can be used to retain all Codable properties.
.periphery.yml: invalid key 'external-codable-protocols'
Configuration options use snake case in the yml, so external_codable_protocols
.
After updating Periphery to 2.18.0, properties in our Codable and Encodable structures started being marked as unused. This issue was not present in version 2.17.1.
Affected structures are used with
JSONEncoder
. There is a section Encodable in the README.md, and it states "This property retention behavior is automatic". That was indeed the case before version 2.18.0, but now it is not so.It might be related to the fact that in version 2.18.0, the
--external-encodable-protocols
flag has been deprecated, and instead, we are now supposed to use--external-codable-protocols
.Is this a bug or an intentionally updated behavior? If it's the latter, then the README.md should also be updated accordingly.