Skip to content

"Julia exit." message causes spurious R CMD check warnings #274

@sbfnk

Description

@sbfnk

Problem

The message("Julia exit.") in the finalizer registered during julia_setup() causes spurious warnings during R CMD check. R CMD check captures this output and attributes it to whatever check is running when R exits, resulting in false positive warnings like:

* checking S3 generic/method consistency ... WARNING
  Julia exit.
  See section 'Generic functions and methods' in the 'Writing R
  Extensions' manual.

* checking replacement functions ... WARNING
  Julia exit.
  The argument of a replacement function which corresponds to the right
  hand side must be named 'value'.

* checking for missing documentation entries ... WARNING
  Julia exit.
  All user-level objects in a package should have documentation entries.

These warnings appear on R-universe builds (see e.g. our R universe builds in https://github.com/r-universe/epiforecasts/actions/runs/20949247186/job/60198781986) and would likely affect CRAN submissions for packages using JuliaCall.

Location

The message is in R/zzz.R:

reg.finalizer(.julia,
              function(e){
                  message("Julia exit.");
                  juliacall_atexit_hook(0);
                  },
              onexit = TRUE)

Suggested fix

  1. Remove the message altogether (not sure what purpose this serves) or perhaps even the whole finalizer given some people seem to see seg faults on exit (Segmentation Fault on closing Julia #219)
  2. Make the message conditional, for example by using if (interactive()) message("Julia exit.");

Session info

  • R-devel
  • JuliaCall 0.17.6
  • Julia 1.12.0

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