Skip to content

Conversation

@copybara-service
Copy link
Contributor

@copybara-service copybara-service bot commented Feb 3, 2026

Refactor FuzzTest custom printer extension points.

The source code printing extension point FuzzTestPrintSourceCode is changed to
be consistent with AbslStringify. The custom printer auto-detection is
simplified: a type is considered to have a custom printer if it has either
AbslStringify or FuzzTestPrintSourceCode (or both). AbslStringify is used
for human-readable mode, and FuzzTestPrintSourceCode is used for the
source-code mode. Either is a fallback if the other extension point is missing.

This change required updates in the XLS code, most of which are straightforward.
One thing worth pointing out is that I moved the printing function for
std::vector<std::vector<Value>> from ir_fuzz_test_library to the value
library, where it fits more naturally.

@copybara-service copybara-service bot force-pushed the cl/864980702 branch 2 times, most recently from 9ad6a34 to da120ee Compare February 5, 2026 05:28
@copybara-service copybara-service bot changed the title Refactor custom printer extension point to use a single function. Refactor custom printer extension points. Feb 5, 2026
@copybara-service copybara-service bot changed the title Refactor custom printer extension points. Refactor FuzzTest custom printer extension points. Feb 10, 2026
The source code printing extension point `FuzzTestPrintSourceCode` is changed to
be consistent with `AbslStringify`. The custom printer auto-detection is
simplified: a type is considered to have a custom printer if it has either
`AbslStringify` or `FuzzTestPrintSourceCode` (or both). `AbslStringify` is used
for human-readable mode, and `FuzzTestPrintSourceCode` is used for the
source-code mode. Either is a fallback if the other extension point is missing.

This change required updates in the XLS code, most of which are straightforward.
One thing worth pointing out is that I moved the printing function for
`std::vector<std::vector<Value>>` from `ir_fuzz_test_library` to the `value`
library, where it fits more naturally.

PiperOrigin-RevId: 868685539
@copybara-service copybara-service bot merged commit fb29fbd into main Feb 11, 2026
@copybara-service copybara-service bot deleted the cl/864980702 branch February 11, 2026 16:17
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.

1 participant