Skip to content

Unit tests and upcoming ggplot2 4.0.0 #9

@teunbrand

Description

@teunbrand

Hi there,

We have been preparing for a new release of ggplot2 and during a reverse dependency check, it became apparent that the prospective ggplot2 3.5.0 would break ggparallel's units tests.

The main culprit is this pattern of unit testing:

load(system.file("mtcars.rda", package="ggparallel")) # loads object test_mtcars_plot
built_saved <- ggplot2::ggplot_build(test_mtcars_plot)
test <- ggparallel(list("gear", "cyl"), data=mtcars)
build_now <- ggplot2::ggplot_build(test)

We don't recommend saving ggplot objects to disk, as it locks in internal code that may change between versions. While we attempt to keep the user-facing functions somewhat stable, we make no such promises about the internal code. For testing that plots still are the same, we recommend the vdiffr package.

Unfortunately, this issued showed up late on our radar and we plan to release ggplot2 3.5.0 on the 12th of February, so I do realise this is not entirely a timely notice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions