Skip to content

Alert downstream maintainers of breaking changes #1793

@krlmlr

Description

@krlmlr

The reverse dependency failures across the R packages you listed share several recurring patterns that strongly suggest a common set of causes, primarily due to recent changes in the igraph package, particularly in version 2.1.5. Here’s a summary of the main patterns and root causes:


 

Common Technical Patterns


1. 

Error in paste0() with type 'closure'

  • Packages affected: alakazam, arulesViz, multivariance, others.

  • Symptom:

Error in paste0(before, x, after) : cannot coerce type 'closure' to vector of type 'character'


  • Likely cause: A function name is being used instead of a variable due to namespace conflict or unintended variable masking. This is often triggered by how igraph or cli formats output with default attributes.


2. 

get_edge_ids() and get.edge.ids() 2x2 matrix error

  • Packages affected: corpustools, dosearch, mwcsr, SEMID, klassR, MetaNet, manynet, others.

  • Symptom:

Error: The `vp` argument of `get_edge_ids()` is not allowed to be a 2 times 2 matrix as of igraph 2.1.5.


  • Likely cause: Code previously passed a 2 x n matrix to igraph::get_edge_ids()—this is now deprecated in favor of n x 2.

  • Solution: Transpose vp with t() or convert to a data.frame.


3. 

Coercion to dgCMatrix fails

  • Packages affected: ccTensor, GMPro, manynet, SEMID, etc.

  • Symptom:

Error in as(incidence, "dgCMatrix"): no method or default for coercing "matrix" to "dgCMatrix"


  • Likely cause: igraph::graph_from_biadjacency_matrix() expects a sparse matrix (Matrix::dgCMatrix), but is given a base matrix.


🧾 

Common Non-Fatal Notes Across Packages

  • “Lost braces; missing escapes or markup?” in Rd files.

  • Large installed size warnings (e.g., >5 MB libs).

  • Non-ASCII characters in data or documentation.


These issues are generally not breaking builds, but may still be best addressed upstream.


🔄 Summary of Common Fixes Needed

Error Pattern Fix
get_edge_ids() 2x2 matrix error Use t(vp) or data.frame(from, to)
as(incidence, "dgCMatrix") Convert to sparse matrix via Matrix::Matrix(incidence, sparse=TRUE)
paste0() closure error Ensure variables are not masked by functions; check label, name, etc.
Rd formatting notes Escape braces: { } or use \code{}
UTF-8 character notes Validate encoding with tools::showNonASCIIfile()



📦 Commonly Affected Stack

  • igraph (especially v2.1.5)

  • cli, rlang, Matrix

  • Plotting or graph construction packages using igraph, ggraph, or tidygraph


Would you like a script to help automatically flag and fix some of these patterns across multiple packages or a report template for notifying maintainers?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions