Skip to content

[R] ATTRIB will be removed #836

@yutannihilation

Description

@yutannihilation

I see this announcement on the R-devel mailing list.

As part of clarifying and tightening the R API for packages the
non-API entry points ATTRIB and SET_ATTRIB will be removed from
installed header files and, where possible, hidden from package
access.

Using these functions is will now result in check NOTEs. These check NOTEs will
soon be replaced by WARNINGs; this will probably happen by the end of
January.

https://stat.ethz.ch/pipermail/r-devel/2025-December/084295.html

nanoarrow (and arrow) uses ATTRIB only in this location to retrieve the first attribute of the ALTREP class object.

SEXP data_class_sym = CAR(ATTRIB(ALTREP_CLASS(x)));

I think this can be replaced with Rf_getAttrib() if the attribute name is known.
But..., I think these attributes are set here and this probably doesn't have the name...? (I might be wrong here)

https://github.com/r-devel/r-svn/blob/344297b51f32eba53d853cbc171d7225446626c6/src/main/altrep.c#L38-L39

If so, they say we can use R_mapAttrib(), which iterates over the attributes.

https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Working-with-attributes

At the moment, I don't come up with any nice fix for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions