Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync dev to main #50

Merged
merged 5 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "rJavaEnv" in publications use:'
type: software
license: MIT
title: 'rJavaEnv: ''Java'' Environments for R Projects'
version: 0.2.1
version: 0.2.2
doi: 10.32614/CRAN.package.rJavaEnv
abstract: 'Quickly install ''Java Development Kit (JDK)'' without administrative privileges
and set environment variables in current R session or project to solve common issues
Expand Down Expand Up @@ -142,17 +142,6 @@ references:
email: cderv@posit.co
orcid: https://orcid.org/0000-0003-4474-2498
year: '2024'
- type: software
title: rJava
abstract: 'rJava: Low-Level R to Java Interface'
notes: Suggests
url: http://www.rforge.net/rJava/
repository: https://CRAN.R-project.org/package=rJava
authors:
- family-names: Urbanek
given-names: Simon
email: simon.urbanek@r-project.org
year: '2024'
- type: software
title: testthat
abstract: 'testthat: Unit Testing for R'
Expand Down
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.2.2
Date: 2024-09-13 19:17:50 UTC
SHA: bae1c6dea15b2f7750ae78d87ab0012a7772081f
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rJavaEnv
Title: 'Java' Environments for R Projects
Version: 0.2.1.9000
Version: 0.2.2
Authors@R: c(
person("Egor", "Kotov", , "kotov.egor@gmail.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-6690-5345")),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ export(java_unpack)
export(rje_consent)
export(use_java)
importFrom(utils,getFromNamespace)
importFrom(utils,installed.packages)
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# rJavaEnv (development version)
# rJavaEnv 0.2.2 (2024-09-13)

* Hot fix: improve robustness of setting Java environment in the current session with either `use_java()` or `java_quick_install()`. See bug fix below.

* Bug fix: Setting Java environment via `rJava::.jniInitialized()` rendered impossible changing Java version for `rJava`-dependent packages, because it somehow pre-initialised `rJava`

# rJavaEnv 0.2.1 (2024-09-03)

Expand Down
3 changes: 2 additions & 1 deletion R/java_env.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ java_env_set <- function(
#'
#' @param java_home The path to the desired JAVA_HOME.
#' @keywords internal
#' @importFrom utils installed.packages
#'
java_env_set_session <- function(java_home) {

# check if rJava is installed and alread initialized
if (any(installed.packages()[, 1] == "rJava")) {
if (any(utils::installed.packages()[, 1] == "rJava")) {
if( "rJava" %in% loadedNamespaces() == TRUE ) {
cli::cli_inform(c("!" = "You have `rJava` R package loaded in the current session. If you have already initialised it directly with ``rJava::.jinit()` or via your Java-dependent R package in the current session, you may not be able to switch to a different `Java` version unless you restart R. `Java` version can only be set once per session for packages that rely on `rJava`. Unless you restart the R session or run your code in a new R subprocess using `targets` or `callr`, the new `JAVA_HOME` and `PATH` will not take effect."))
}
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/e-kotov/rJavaEnv",
"issueTracker": "https://github.com/e-kotov/rJavaEnv/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.2.1",
"version": "0.2.2",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -164,7 +164,7 @@
},
"SystemRequirements": null
},
"fileSize": "219.168KB",
"fileSize": "219.775KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
23 changes: 3 additions & 20 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
# Re-submission
# rJavaEnv 0.2.2 (2024-09-13)

## Update to 0.2.1
* Hot fix: improve robustness of setting Java environment in the current session with either `use_java()` or `java_quick_install()`. See bug fix below.

Brings new functions based on very quick user feedback after the first release.
Also, hopefully, the new safeguarding with 'eval=false' in vignette will prevent erros on macos-oldrel https://cran.r-project.org/web/checks/check_results_rJavaEnv.html when vignette code is executed, even though the whole vignette is set no to evaluate the code.

# rJavaEnv 0.2.1 (2024-09-03)

* Documentation and description clean-up

# rJavaEnv 0.2.0 (2024-08-28)

* Improvement: `java_check_version_cmd()` and `java_check_version_rjava()` now return detected `Java` version instead of `TRUE`/`FALSE`. Note that this is a breaking change, but not critical given that the package has not obtained a significant user base yet.

* New function `use_java()` to download, install and set `Java` from cache for the current sesssion, without touching the current project/working directory. This is intended for use with `targets` and `callr`.

* New vignette on using the package with `targets' and 'callr`

* Updated documentation with clearer instructions on cache folder cleanup before removing the package

* Depends on `R` > 4.0 to be able to write to the package cache directory without extra user warning. Cache cleanup and management functions are provided, as well as the documentation in both README and vignettes.
* Bug fix: Setting Java environment via `rJava::.jniInitialized()` rendered impossible changing Java version for `rJava`-dependent packages, because it somehow pre-initialised `rJava`
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.4.1 (2024-06-14)",
"version": "0.2.1"
"version": "0.2.2"
},
{
"id": "https://doi.org/10.32614/CRAN.package.rJavaEnv",
Expand Down
Loading