ze: stop doubling the zex namespace in class names - #538
Open
TApplencourt wants to merge 1 commit into
Open
Conversation
Every other namespace drops its prefix from the class name, because the class already carries it: zet_metric_properties_t -> ZETMetricProperties. zex was left out of the strip pattern, so its four classes kept the prefix and then had it added again -- ZEXZexWaitOnMemDesc. The comment said this was on purpose because it "is what the generated bindings already spell", which describes the output rather than giving a reason for it. With x added, the strip pattern and the namespace pattern say the same thing twice, so there is one left: the prefix that names a type's namespace is the prefix a class name drops. The capture group the namespace lookup needs is ignored by the strip's sub. The rename reaches the two places that must agree with it or pretty-printing raises NameError at trace time: babeltrace_ze_lib.rb and the :be_class in btx_ze_model.yaml. All 247 ZE:: constants referenced by those two files resolve, and the four classes construct with unchanged sizes. Generated: ze_library.rb, ze_bindings.rb, babeltrace_ze_lib.rb and btx_ze_model.yaml change by this rename and nothing else. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before we where generating: ZEXZexWaitOnMemDesc.