You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue meant to track fallout from #5879 as determined through reverse dependency check in dbea0a6.
Issue #6003 was already identified and fixed in #6004.
Another issue is that names(ggplot()) no longer contains the labels field. This trips up some tests in dependencies that expect that length(ggplot()) is some fixed value. This should be easy to fix.
Another issue is that people sometimes test expect_equal(plot$labels$var, "value"). As plot$labels is no longer filled upon adding layers, plot$labels is empty in many such cases and thus the tests fail. This affects >30 packages and is not straightforward to fix, so we'd need to decide wether to revert #5879 or ask maintainers to adapt their tests.
The text was updated successfully, but these errors were encountered:
I think #5879 is a great addition! If you decide to keep this, I'd be happy to help submit PRs to other packages. Maybe helping moving the tests from tests that are quite sensitive and slow down ggplot2's process.
expect_length(ggplot(), <specificlength># better test
expect_s3_class(ggplot(), "ggplot")
Maybe ggplot2 could benefit from having a get_aes_labels() which could return a named vector and be helpful for ggplot2 extensions. (Please disregard if it doesn't make sense).
Thanks for the offer @olivroy! The length(ggplot()) issue is very fixable, so we wouldn't need to bother other maintainers for this. I like the idea of writing a getter for the labels. For now let's wait a bit before sending out PRs, maybe some elegant solution comes to mind in the meanwhile.
This is an issue meant to track fallout from #5879 as determined through reverse dependency check in dbea0a6.
Issue #6003 was already identified and fixed in #6004.
Another issue is that
names(ggplot())
no longer contains thelabels
field. This trips up some tests in dependencies that expect thatlength(ggplot())
is some fixed value. This should be easy to fix.Another issue is that people sometimes test
expect_equal(plot$labels$var, "value")
. Asplot$labels
is no longer filled upon adding layers,plot$labels
is empty in many such cases and thus the tests fail. This affects >30 packages and is not straightforward to fix, so we'd need to decide wether to revert #5879 or ask maintainers to adapt their tests.The text was updated successfully, but these errors were encountered: