Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update natvis to include a few tweaks #383

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

dmachaj
Copy link
Contributor

@dmachaj dmachaj commented Jul 17, 2023

Why is this change being made?

I set up the natvis in a new project that is using rapidyml and it was missing the primary type that we are using (ConstNodeRef). Additionally I discovered that the children synthetic visualization for NodeRef/ConstNodeRef was not being parsed correctly. The order of operations on the bitwise operator was causing the condition to always evaluate to false.

Briefly summarize what changed

  • Duplicate the NodeRef visualization as ConstNodeRef. ConstNodeRef does not have an m_seed field so it cannot be exactly identical or else it fails to apply.
  • Tweak NodeData::m_parent to special-case NONE instead of printing uint64(-1).
  • Fix the [children] expansion in NodeRef/ConstNodeRef.
  • Expand elm to element. (This one is arguable; I'm tempted to expand them all out so they are easier to understand without abbreviation).

I also tried to get NodeData to have a synthetic child with the expansion of the sub-elements (e.g. KEYMAP can print the keys in the map). Unfortunately this does not seem to be possible because the NodeData has the raw indexes but no pointer to the memory allocation.

How was this change tested?

I have a ~10 line program using rapidyml along with an OpenAPI.yml file from a public sample.

Closes #380

@biojppm biojppm force-pushed the master branch 4 times, most recently from d128813 to 507400e Compare April 16, 2024 23:52
@biojppm
Copy link
Owner

biojppm commented Apr 28, 2024

LGTM. Thanks!

@biojppm biojppm merged commit 2422254 into biojppm:master Apr 28, 2024
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.

Natvis support is missing some ryml types
2 participants