Skip to content

Conversation

@jmbarbone
Copy link
Contributor

@jmbarbone jmbarbone commented Oct 22, 2025

Replaces list2(...) with dots_list(..., .ignore_empty = "all") to allow for empty, trailing args to be combined with other args

Adds test with example from #6710

This simple fix would allow for empty args placed in the middle (e.g., scale_fill_discrete(breaks = 1:2, , direction = -1L,) works fine). This may not be ideal, but some inject(scale_backward_compatibility(!!!list2(...), *)) worked fine in testing (and what I originally did in 6388981 because I forgot how dots_list() worked...)

@jmbarbone jmbarbone changed the title handles empty args in backwards campatible functions handles empty args in backwards compatible functions Oct 22, 2025
@teunbrand teunbrand added this to the ggplot2 4.0.1 milestone Nov 4, 2025
Copy link
Collaborator

@teunbrand teunbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you for the contribution!

@teunbrand teunbrand merged commit 7a746b2 into tidyverse:main Nov 4, 2025
13 checks passed
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.

2 participants