Skip to content

Commit

Permalink
[GR-36122] Backport: Update cluster version.
Browse files Browse the repository at this point in the history
PullRequest: fastr/2686
  • Loading branch information
gilles-duboscq committed Jan 7, 2022
2 parents 9742cb7 + db086c5 commit 78888bd
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 22.0.0
* Adopted [NodeLibrary](https://www.graalvm.org/truffle/javadoc/com/oracle/truffle/api/interop/NodeLibrary.html).
* In unit tests, use single shared context rather than multiple inner contexts.
* Update recommended packages:
* cluster to version 2.1.2 (2021-04-17)

# 21.3.0
* Upgrade of [PCRE](https://www.pcre.org/) to PCRE2 version 10.37.
Expand Down
2 changes: 1 addition & 1 deletion ci.jsonnet
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ overlay : '2bdde206f738bed75f31cab12137df1d682d1d6f' }
{ overlay : '72fd5ca67a4817f8825e0e74741a134d2d963bb5' }
40 changes: 36 additions & 4 deletions com.oracle.truffle.r.native.recommended/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ endif

FASTR_R_HOME = $(abspath $(TOPDIR)/..)
R_VERSION = 4.0.3
# The package tar balls are copied from $(GNUR_HOME_BINARY_UNPACKED)/src/library/Recommended
# Most of the package tar balls are copied from $(GNUR_HOME_BINARY_UNPACKED)/src/library/Recommended
export GNUR_HOME_BINARY_UNPACKED = $(FASTR_R_HOME)/libdownloads/R-$(R_VERSION)

ifndef GNUR_HOME_BINARY
Expand Down Expand Up @@ -68,11 +68,27 @@ GNUR_RECOMMENDED_PKGNAMES := codetools
endif # FASTR_RELEASE
GNUR_RECOMMENDED_PKGNAMES_TS = $(GNUR_RECOMMENDED_PKGNAMES:=.ts)

# Recommended packages that are used by fastr in a specific version, i.e., taken from other sources than GNUR_RECOMMENDED_BINARY
PKGS_WITH_CUSTOM_VERSION := cluster rpart
RPART_TAR := $(FASTR_R_HOME)/libdownloads/rpart.tar.gz
CLUSTER_TAR := $(FASTR_R_HOME)/libdownloads/cluster.tar.gz

GNUR_RECOMMENDED_TAR_DIR = $(GNUR_HOME_BINARY_UNPACKED)/src/library/Recommended/
GNUR_RECOMMENDED_TARS := $(foreach pkg, $(GNUR_RECOMMENDED_PKGNAMES),$(GNUR_RECOMMENDED_TAR_DIR)/$(pkg)*.tar.gz)
# We do not copy all the recommended packages from gnur's directory. Instead, there are some
# packages that we take from different sources.
GNUR_RECOMMENDED_TARS := \
$(foreach pkg, \
$(filter-out $(PKGS_WITH_CUSTOM_VERSION),$(GNUR_RECOMMENDED_PKGNAMES)), \
$(GNUR_RECOMMENDED_TAR_DIR)/$(pkg)*.tar.gz \
)
ALL_RECOMMENDED_TARS := $(GNUR_RECOMMENDED_TARS) $(RPART_TAR) $(CLUSTER_TAR)

## need to allow parallel installs
INSTALL_OPTS = --pkglock --data-compress=xz --no-staged-install

$(info GNUR_RECOMMENDED_PKGNAMES = $(GNUR_RECOMMENDED_PKGNAMES))
$(info ALL_RECOMMENDED_TARS = $(ALL_RECOMMENDED_TARS))

# in managed mode, we do nothing
ifneq ($(FASTR_RFFI),managed)

Expand All @@ -84,7 +100,7 @@ ifdef FASTR_RECOMMENDED_BINARY

$(info Using FastR recommended packages binary: $(FASTR_RECOMMENDED_BINARY))

install.recommended: $(GNUR_RECOMMENDED_TARS)
install.recommended: $(ALL_RECOMMENDED_TARS)
# @if ! (mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr | tail -n 1 | diff -q $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt -); then \
# echo "******************************"; \
# echo "ERROR:"; \
Expand All @@ -105,7 +121,23 @@ install.recommended: $(GNUR_RECOMMENDED_TARS)
# If FASTR_RECOMMENDED_BINARY is not defined, we just build the packages
else

$(info GNUR_RECOMMENDED_TARS=$(GNUR_RECOMMENDED_TARS))
RPART_DIR_NAME := bethatkinson-rpart-4020bb4
RPART_BUILT_TARBALL := rpart_4.1-16.tar.gz
# rpart package is downloaded as a tarball directly from GitHub. Unfortunately, we have to make some
# modifications to that tarball - remove `build` directory.
rpart.ts: $(RPART_TAR)
@echo 'Installing recommended package rpart'
tar xf $<
rm -rf $(RPART_DIR_NAME)/build
# This command creates $RPART_BUILT_TARBALL via GNU-R for better compatibility
$(GNUR_HOME_BINARY)/bin/R CMD build --no-build-vignettes $(RPART_DIR_NAME)
_R_CHECK_INSTALL_DEPENDS_=no FASTR_USE_F2C=true $(FASTR_R_HOME)/bin/R --polyglot CMD INSTALL $(INSTALL_OPTS) --library=$(FASTR_R_HOME)/library $(RPART_BUILT_TARBALL) &> $@.out || (cat $@.out && exit 1)
@echo Finished installing recommended package `basename $<`

cluster.ts: $(CLUSTER_TAR)
@echo Installing recommended package `basename $<`
@_R_CHECK_INSTALL_DEPENDS_=no FASTR_USE_F2C=true $(FASTR_R_HOME)/bin/R --polyglot CMD INSTALL $(INSTALL_OPTS) --library=$(FASTR_R_HOME)/library $< &> $@.out || (cat $@.out && exit 1)
@echo Finished installing recommended package `basename $<`

%.ts: $(GNUR_RECOMMENDED_TAR_DIR)%.tgz
@echo Installing recommended package `basename $<`
Expand Down
52 changes: 37 additions & 15 deletions mx.fastr/suite.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
suite = {
"mxversion" : "5.282.0",
"mxversion" : "5.316.14",
"name" : "fastr",
"versionConflictResolution" : "latest",
"imports" : {
Expand Down Expand Up @@ -31,8 +31,8 @@

"repositories" : {
"snapshots" : {
"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots",
"licenses" : ["GPLv3"]
"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots",
"licenses" : ["GPLv3"]
}
},

Expand All @@ -48,24 +48,44 @@
# libraries that we depend on
"libraries" : {
"GNUR" : {
"path" : "libdownloads/R-4.0.3.tar.gz", # keep in sync with the GraalVM support distribution
"urls" : ["https://cran.rstudio.com/src/base/R-4/R-4.0.3.tar.gz"],
"sha1" : "5daba2d63e07a9f39d9b69b68f0642d71213ec5c",
"resource" : "true"
"path" : "libdownloads/R-4.0.3.tar.gz", # keep in sync with the GraalVM support distribution
"urls" : ["https://cran.rstudio.com/src/base/R-4/R-4.0.3.tar.gz"],
"sha1" : "5daba2d63e07a9f39d9b69b68f0642d71213ec5c",
"resource" : "true"
},

"F2C" : {
"path" : "libdownloads/f2c/src.tgz",
"urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/f2c/20191129/src.tgz"],
"sha1" : "8a26107bf9f82a2dcfa597f15549a412be75e0ee",
"resource" : "true"
"path" : "libdownloads/f2c/src.tgz",
"urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/f2c/20191129/src.tgz"],
"sha1" : "8a26107bf9f82a2dcfa597f15549a412be75e0ee",
"resource" : "true"
},

"LIBF2C" : {
"path" : "libdownloads/f2c/libf2c.zip",
"urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/f2c/20191129/libf2c.zip"],
"sha1" : "e39a00f425f8fc41dde434686080a94e94884f30",
"resource" : "true"
"path" : "libdownloads/f2c/libf2c.zip",
"urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/f2c/20191129/libf2c.zip"],
"sha1" : "e39a00f425f8fc41dde434686080a94e94884f30",
"resource" : "true"
},

# A recommended package "rpart" with a fixed version rather than taken from GNU-R.
"RPART" : {
"path" : "libdownloads/rpart.tar.gz",
"ext" : ".tar.gz",
"version" : "4020bb4ee8fd6739bd97e8c39931fa7e3901300c",
"urls" : ["https://api.github.com/repos/bethatkinson/rpart/tarball/{version}"],
"sha1" : "ec76dbd51acad10bed843a0005ba5fdcf5c7a35d",
"resource" : "true"
},

# A recommended package "cluster" with a fixed version rather than taken from GNU-R.
"CLUSTER" : {
"path" : "libdownloads/cluster.tar.gz",
"ext" : ".tar.gz",
"version" : "2.1.2",
"urls" : ["https://cran.r-project.org/src/contrib/cluster_{version}.tar.gz"],
"sha1" : "47763fa44d11e0f2c2feafade3e331c05eda30d1",
"resource" : "true"
},

"XZ-1.8" : {
Expand Down Expand Up @@ -342,6 +362,8 @@

"com.oracle.truffle.r.native.recommended" : {
"dependencies" : [
"RPART",
"CLUSTER",
"com.oracle.truffle.r.native",
"com.oracle.truffle.r.engine",
"com.oracle.truffle.r.ffi.impl",
Expand Down

0 comments on commit 78888bd

Please sign in to comment.