Rework grid functions to be more robust to duplicate auto names #1230
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.
Related to auto-naming:
Closes #1221
Closes #1116
Closes #1092
Closes #1037
Closes #992
Other:
Closes #1189
This was a tricky one to fix.
Ultimately, I combined a few ideas together:
quos_auto_name(repair_auto = "unique", repair_quiet = TRUE)
from Addrepair_auto
andrepair_quiet
toexprs_auto_name()
r-lib/rlang#1194, but that is in rlang 1.0.0 and we don't use dev rlang yet. So I've just inlined the idea of it for now. Notably, that only performs unique repair on the auto-named inputs, which is definitely the right approach. This avoids getting duplicate names like<int>
or truncated names liketibble(...)
when a long tibble expression is inlined.tibble:::tibble_quos()
for iterative expressions (i.e. when the user doesx = 1, y = x
). This involves setting up a data mask that is separate from the actual output object.""
before returning fromgrid_dots()
, which serves as a signal that they should be unpacked when supplied todata_frame()
. This means we were able to get rid of all usage offlatten_at()
andflatten_nested()
.No changes to worse in revdeps