Skip to content

Conversation

redsun82
Copy link
Contributor

This replaces numeric tag-based prefixes with the actual tag name.
While this means in general slightly larger trap files, it aids
debugging them for a human.

In the future we can make this conditional on some kind of trap debug
option, but for the moment it does not seem detrimental.

This replaces numeric tag-based prefixes with the actual tag name.
While this means in general slightly larger trap files, it aids
debugging them for a human.

In the future we can make this conditional on some kind of trap debug
option, but for the moment it does not seem detrimental.
@redsun82 redsun82 requested a review from AlexDenisov July 28, 2022 10:46
@redsun82 redsun82 requested a review from a team as a code owner July 28, 2022 10:46
@github-actions github-actions bot added the Swift label Jul 28, 2022
@redsun82
Copy link
Contributor Author

For reference, here's how a DB inconsistency from an integration test looks with this change:

[INVALID_KEY_SET] predicate iterable_decl_context_members(@iterable_decl_context id, int index, @decl member): The key set {id, index} does not functionally determine all fields.
Here is a pair of tuples that agree on the key set but differ at index 2:
Tuple 1 in row 4525: (77649,2,77699)
Tuple 2 in row 4526: (77649,2,230376)
	Relevant element: Tuple 1: id=77649
		Full ID for 77649: @"StructDecl_So10HeapObjectV"
	Relevant element: Tuple 2: id=77649
		Full ID for 77649: @"StructDecl_So10HeapObjectV"

The StructDecl instead of a number is the difference.

Copy link
Contributor

@AlexDenisov AlexDenisov left a comment

Choose a reason for hiding this comment

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

Love it!

@redsun82 redsun82 merged commit 8a36a2b into main Jul 28, 2022
@redsun82 redsun82 deleted the redsun82/swift-human-readable-trap-prefixes branch July 28, 2022 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants