From 74f0da24597f6dbb4fefade9128f94c54b6e3829 Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Fri, 20 Oct 2023 11:18:47 -0700 Subject: [PATCH] Only mention that 'compiler' will be loaded from enabling JIT, if not already loaded --- DESCRIPTION | 2 +- R/startup.R | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index eb63ee7..c5f23fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: startup -Version: 0.20.0-9003 +Version: 0.20.0-9004 Title: Friendly R Startup Configuration Depends: R (>= 2.14.0) Suggests: commonmark, tools, tcltk diff --git a/R/startup.R b/R/startup.R index c0cfbb0..82b37b2 100644 --- a/R/startup.R +++ b/R/startup.R @@ -490,12 +490,16 @@ startup <- function(sibling = FALSE, all = FALSE, logf(" - R_ENABLE_JIT: %s", value) if (is.na(jit)) { logf(" - JIT compiler enabled by default") - logf(" - The 'compiler' package will be loaded") + if (!"compiler" %in% loadedNamespaces()) { + logf(" - The 'compiler' package will be loaded") + } } else { value <- suppressWarnings(as.integer(jit)) if (!is.na(value) && value > 0L) { logf(" - JIT compiler enabled at level %d", jit) - logf(" - The 'compiler' package will be loaded") + if (!"compiler" %in% loadedNamespaces()) { + logf(" - The 'compiler' package will be loaded") + } } else { logf(" - JIT compiler disabled") }