Skip to main content

Report on the jlbind setup

Source: R/sitrep.R

Description

Prints a report to run when a package that uses jlbind doesn’t work. It shows the Julia that builds the library, the library that is loaded (or would be) and what it was built from, the installed packages that use jlbind and whether the library is current for each, and the Julia thread count. It also works before a library has loaded.

Usage

jlbind_sitrep(julia = NULL)

Arguments

julia Path to the julia executable. By default, the JULIA environment variable, or julia on the PATH.

Value

Invisibly, a list with:

  • julia: a list with path (NA if Julia was not found), source ("argument", "JULIA" or "PATH"), version (NA if it could not be run) and ok (whether it is Julia 1.13 or later).

  • library: a list with path, how ("loaded", "failed to load", "JLBIND_LIBRARY" or "default"), exists, build (how it was built: the jlbind and Julia versions, when, and whether it is trimmed, or NULL), problems (why it should be rebuilt or cannot load; empty if none) and objects (how many Julia objects R holds references to, or NULL if no library is loaded).

  • clients: a data frame with one row per package that uses jlbind or that the library was built for, with the columns package, version (installed), built (the version in the library), status ("ok", "left out", "not in the library", "built for version <v>", "Julia code changed" or "not installed") and bound.

  • threads: a list with count (from JULIA_NUM_THREADS) and fixed (TRUE once a library is loaded, after which the count cannot change).

Examples

jlbind_sitrep()
#> ── Julia (for building the library)
#> ✔ Julia 1.13.2 at /usr/bin/julia (from PATH)
#> ── Library
#> ✖ /home/runner/.local/share/R/jlbind/library/jlbind.so (default)
#> ✖ it has not been built
#> ── Packages that use jlbind
#>   none installed
#> ── Threads
#>   1 Julia thread (JULIA_NUM_THREADS unset)