Open
Conversation
DavisVaughan
approved these changes
Feb 5, 2026
|
|
||
| case R_ENV_BINDING_TYPE_unbound: | ||
| break; | ||
| } |
Member
There was a problem hiding this comment.
To be super safe, I wonder if you should add a default: case that errors. I always get burned by this in C where it doesn't care whether you are exhaustive or not in your switches
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.
Closes #48
I fixed the issue and made progress towards conformant API by switching to an iteration approach that uses the accessors discussed in https://bugs.r-project.org/show_bug.cgi?id=18928.
The first commit imports the rlang C library.
The second commit uses the new environment API of r-lib/rlang#1871 to iterate over environments. This API implements non-compliant fallbacks for older R versions (currently that's all R versions). Once https://bugs.r-project.org/show_bug.cgi?id=18928 is merged, updating the rlang library will be enough to make lobstr compliant.
Because we can no longer inspect the environment frames/hashtables, we compute an estimation of their size instead.