Skip to content

Reverse-dependency updates for the next S7 release #786

Open

Description

@t-kalinowski

This tracks downstream updates identified during reverse-dependency checks against development S7. The PRs are grouped by the changes they contain; packages can appear in several categories.

Jump to downstream PR status

Avoid conflicting := imports

S7 now exports :=. Packages importing it from both S7 and rlang or data.table get an import-replacement warning.

These patches retain S7’s operator and exclude the rlang or data.table placeholder. For example:

#' @import S7
#' @import rlang, except = ":="
NULL

The same applies to data.table. Existing uses of := inside tidy evaluation or data.table expressions continue to work.

PRs: ale, apa7, ellmer, GGally, joinery, rtemis, rtemis.a3, rtemis.core, rtemis.llm, shinyOAuth.

Use S7’s package lifecycle hooks

The patches adopt the current package hooks:

  • S7_on_load() registers methods when the package loads.
  • S7_on_build() removes temporary bindings left by method registration, so calls to imported generics still find the original functions. It runs at the top level, after method declarations.
  • S7_on_unload() cleans up S7 method registrations and dependency hooks when the package unloads.

The build hook directly fixes failures in packages such as btw, filtro, mighty.metadata, and mixtime, where imported functions were left bound to registration placeholders. Other packages receive the lifecycle updates alongside their compatibility fixes; each hook addition does not represent a separate revdep failure.

Packages retaining support for older S7 guard the new hooks and keep methods_register() as the load fallback.

PRs: ale, apa7, bidsr, btw, caugi, cohortBuilder, deltapif, ellmer, filtro, GGally, ggarrow, ggdiagram, gglogger, ggpath, ggplot2, GitAI, imply, joinery, marquee, medfit, mighty.metadata, mixtime, myTAI, nflplotR, rtemis, rtemis.a3, rtemis.core, rtemis.draw, rtemis.llm, S7schema, shinychat, shinyfilters, shinyOAuth, statim, vecvec.

Update constructors and inherited properties

Several custom constructors pass a class definition or an unrelated S7_object() as their parent. These patches construct an instance of the declared parent instead. Other changes pass the parent positionally to accommodate the renamed new_object() argument, or name arguments when forwarding them through generated constructors.

PRs: bidsr, btw, caugi, cohortBuilder, deltapif, ggarrow, ggdiagram, ggpath, mighty.metadata, rtemis.a3, S7schema.

Related property changes:

  • dcmstan uses getter-only inherited properties and generated constructors. The parent initializes and validates the model identifier; the child makes it read-only afterward.
  • ggpath stores image dimensions in image_size, avoiding a conflict with the inherited numeric size property.
  • rtemis preserves the parent’s declared property type when reconstructing inherited runtime properties from a schema.

Quote complex property defaults

S7 now warns about complex values supplied directly as property defaults. These patches supply the expression that constructs the value, for example:

default <- quote(c(0, 1))

This keeps the expression in the generated constructor and evaluates it for each new object. Plain scalars and empty vectors without attributes can still be supplied directly.

Property factories in bidsr and rtemis also need to preserve the quoted expression while using its evaluated value for validation or metadata.

PRs: bidsr, ellmer, filtro, mixtime, rtemis, rtemis.core, rtemis.draw, shinyOAuth.

Other compatibility changes

Change Packages and PRs
Check whether an object is S7 explicitly. S7_class() now describes ordinary R objects too, so a non-NULL result no longer identifies an S7 object. shinyfilters, statim
Capture the original operand expression under updated method dispatch, preserving useful error messages and replayable logs. ggplot2, gglogger
Use public method discovery and lookup APIs. Store calendar membership on unit instances and preserve it through reconstruction; the arithmetic graph algorithms remain unchanged. mixtime
Match the dispatch dimensions of base [[ and $ generics. bidsr
Register property unions with S4 before registering the classes that use them. imply, medfit; PFIM patch (submission pending)
Handle shared S7 class definitions in coverage instrumentation and serialization. covr, typedjson
Use S7_data() to extract underlying image data, and update a test that assumed it removed the parent S3 class. imply, ggplot2
Match constructor documentation to generated arguments and defaults. ellmer, myTAI, nflplotR, shinychat
Preserve array dimensions during replacement and resolve callbacks in the correct evaluation context. vecvec
Supply model configuration in mocked chat fixtures. GitAI
Add a missing S7 namespace import. marquee

Existing upstream work and submission order

measr PR #90 already covers its constructor documentation and lifecycle updates, so no separate PR is planned. The dcmstan patch builds on its maintainer’s merged S7 updates.

Some patches depend on others: ggpath precedes nflplotR, S7schema precedes mighty.metadata, and rtemis.core precedes its dependents.

The PFIM patch is available as a diff against the read-only cran/PFIM mirror. Submission to the package maintainers is still pending.

Downstream PR status

For easier tracking, here is the complete list of downstream PRs. GitHub displays each PR’s current state.

Activity

  1. t-kalinowski commented on Oct 16, 2026

    @t-kalinowski
    MemberAuthor

    Opened three PRs for ggplot2:

    • #6914: Update lifecycle hooks and fix internal test failures with development S7.
    • #6915: Declare compatibility class names in the S7 hierarchy so subclasses inherit them.
    • #6916: Preserve plain-list conversion for mappings, themes, and labels, and update a validation-error snapshot.

    With all three changes applied, the full ggplot2 test suite passes against both released S7 0.2.2 and development S7.

  2. hadley commented on Oct 17, 2026

    @hadley
    Member

    Do we want to pick a release date (maybe Nov 16?) so we can give folks a concrete timeline?

    (Thanks for doing all this work! Hopefully AI did most of the PRs for you)

  3. t-kalinowski commented on Nov 2, 2026

    @t-kalinowski
    MemberAuthor

    Thanks, @hadley! I'm planning to submit S7 1.0.0 to CRAN on November 16. I've notified maintainers on all 41 linked downstream PRs; eight packages already have the updates on CRAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions