Skip to content

Conversation

@isoos
Copy link
Collaborator

@isoos isoos commented Dec 16, 2024

Note: isBlocked could also be removed, but to be on the safe side I'd do that in the release after the current one.

#8336

@isoos isoos requested a review from sigurdm December 16, 2024 10:02
if (_unmappedFields.isNotEmpty) {
for (final field in _unmappedFields) {
if (_knownUnmappedFields.contains(field)) continue;
yield 'Unmapped field found: $field.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we report more? Like give some entity with this field, and the entitty type

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are reporting EntityType.fieldName here. I'm not sure if we need to have a full entity identifier, as these fields are typically unused, but maybe we could report one id for each of the reported entries? That way we can store it in a Map and only keep the first one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented this, PTAL.

final DatastoreDB _db;
final int _concurrency;

static const _knownUnmappedFields = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document the scope of this (is it only about packages?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed + done.

'Package.isWithheld',
'Package.withheldReason',
};
final _unmappedFields = <String>{};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure, do we create a new IntegrityChecker for each run?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is a one-off object on each run.

@isoos isoos requested a review from sigurdm December 16, 2024 14:59
@isoos isoos merged commit 878d0f2 into dart-lang:master Dec 16, 2024
32 checks passed
@isoos isoos deleted the unmapped branch December 16, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants