WIP: Initial infrastructure for editions #6203
Draft
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.
This PR aims to adress a topic discussed by Thomas and me off-github.
Briefly, we'd like to bring edition structure to ggplot2 to opt-in otherwise backward incompatible changes. It is modelled after testthat, with a few adaptations. This PR just aims to introduce infrastructure for working with editions in ggplot2.
The most important difference with testthat is in the relation that it has to other packages. The testthat package has 1:1 relationships: the tests of one single package does not affect tests in a second package. In contrast, it is not unreasonable to assume that for example {extensionPkg} defines ggplot2 extensions, which are then subsequently used by wrappers in {wrapperPkg}. In this example {extensionPkg} and {wrapperPkg} might opt-in different editions, which needs to be facilitated. For this reason, this PR gives each package their own local edition.
This PR is currently marked WIP as some details need to be ironed out. Specifically: