Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Initial infrastructure for editions #6203

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teunbrand
Copy link
Collaborator

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:

  • How do we expect maintainers of reverse dependencies to interact with the edition system?
  • How do we expect users to interact with the edition system?
  • What type of things do we want to edition?

Comment on lines +36 to +42
desc,
grDevices,
grid,
gtable (>= 0.1.1),
isoband,
lifecycle (> 1.0.1),
pkgload,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't like having to take on these dependencies.
Would it be bad to have a homebrew solution to parsing the description file?

@teunbrand teunbrand added this to the Editioning milestone Nov 26, 2024
@teunbrand
Copy link
Collaborator Author

Add a few example cases to edition

return(desc::desc(package = package))
} else {
try_fetch(
pkgload::pkg_desc(path),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Avoid this block

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.

1 participant