Fix obj_size() with immediate bindings
#88
+6,725
−18
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.