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
Improve MetaDataProtoEditor handling of unqualified types and add support for renaming all the types (#3402)
This does two things:
- It adds a new `MetaDataProtoEditor.renameRecordTypes` that takes a
function to rename all the types.
- When trying to add tests for that, I discovered #3428 and resolved it.
The solution here is that it converts the protobuf back into a
`Descriptors.FileDescriptor`, and lets that do the type resolution. This
requires you to be able to get the dependencies in order to do these
operations, but it means that we don't have to try to re-implement
protobuf's type resolution.
And don't be too afraid about the lines changed, it is mostly new json
files to try and test more of the rename logic.
Historical note: I didn't realize MetaDataProtoEditor existed, so I
wrote my own suite of tests, and implementation. Then discovered and
tried to merge, at which point I discovered that it couldn't handle the
unqualified types in my protobufs, and thus went about fixing it. In
hindsight, I should have stopped to fix the issue about ambiguous types
and come back to the new method, but I was using the new tests to
validate it.
Resolves: #3428
0 commit comments