Skip to content

Make MetaDataProtoEditor reject renaming record types with indexes declared via the (field).index extension - #4715

Open
robert-brunel wants to merge 2 commits into
mainfrom
apple/robert-brunel/renameRecordTypes-5
Open

robert-brunel wants to merge 2 commits into
mainfrom
apple/robert-brunel/renameRecordTypes-5

Conversation

@robert-brunel

@robert-brunel robert-brunel commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

With this change, renameRecordType() and renameRecordTypes() now throw a MetaDataException if a RECORD-usage record type has an index that is declared through the (field).index extension (or the deprecated (field).indexed alternative) but not listed in MetaData.indexes. Previously, both methods would allow renaming such a record type, but that would essentially turn the index into a different index whose existing entries would no longer be found.

Follow-up to #4536. Resolves #4733.

@robert-brunel robert-brunel added the enhancement New feature or request label Oct 6, 2026
@robert-brunel
robert-brunel added this pull request to stack #4538 October 6, 2026 17:38
@robert-brunel robert-brunel self-assigned this Oct 6, 2026
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from bd01733 to d10c4fc Compare October 6, 2026 17:41
@alecgrieser
alecgrieser force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from d10c4fc to 2447414 Compare October 7, 2026 15:51
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from 2447414 to aad26b2 Compare October 9, 2026 17:42
@robert-brunel robert-brunel changed the title Make MetaDataProtoEditor reject renaming record types that are missing from the record type list Make MetaDataProtoEditor reject renaming record types with indexes declared via the (field).index extension Oct 9, 2026
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from aad26b2 to fa82b4c Compare October 9, 2026 18:47
@robert-brunel robert-brunel added the breaking change Changes that are not backwards compatible label Oct 9, 2026
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from fa82b4c to 8d63cb3 Compare November 3, 2026 13:10
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch 2 times, most recently from 90dee66 to 5899aea Compare November 9, 2026 13:29
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from 5899aea to 9bf0ec1 Compare November 9, 2026 14:10
Base automatically changed from apple/robert-brunel/renameRecordTypes-4 to main November 9, 2026 14:37
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from 9bf0ec1 to 9f0c2f8 Compare November 9, 2026 14:37
…that only the `(field).index` extension declares

With this change, `renameRecordType()` and `renameRecordTypes()` now throw a `MetaDataException` if a `RECORD`-usage record type has an index that is declared through the `(field).index` extension (or the deprecated `(field).indexed` alternative) but not listed in `MetaData.indexes`. Previously, both methods would allow renaming such a record type, but that would essentially turn the index into a different index whose existing entries would no longer be found.

Resolves #4733.
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/renameRecordTypes-5 branch from 9f0c2f8 to f40d1ec Compare November 9, 2026 15:20
@robert-brunel
robert-brunel marked this pull request as ready for review November 9, 2026 15:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Changes that are not backwards compatible enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MetaDataProtoEditor record type renames can change indexes declared via the (field).index extension

2 participants