From 67169333e5c872e9947663e573057927adeba724 Mon Sep 17 00:00:00 2001 From: shrektan Date: Fri, 23 Aug 2024 23:33:27 +0800 Subject: [PATCH] Added rustc version reporting in the installation log as per CRAN policy --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ configure | 12 ++++++++++-- configure.win | 12 ++++++++++-- cran-comments.md | 29 +++++++++++------------------ 5 files changed, 36 insertions(+), 23 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 48e9874..11a76e8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ymd Title: Parse 'YMD' Format Number or String to Date -Version: 0.1.1 +Version: 0.1.2 Authors@R: c( person("Xianying", "Tan", , "shrektan@126.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6072-3521")), diff --git a/NEWS.md b/NEWS.md index c6d60a4..d7447b4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# ymd 0.1.2 + +* Added rustc version reporting in the installation log as per CRAN policy. + # ymd 0.1.1 * Fix the calling non-API entry points issue. diff --git a/configure b/configure index b9468a3..c5041ac 100755 --- a/configure +++ b/configure @@ -15,11 +15,19 @@ if [ -e "${HOME}/.cargo/env" ]; then BEFORE_CARGO_BUILD="${BEFORE_CARGO_BUILD} . \"${HOME}/.cargo/env\" \\&\\&" fi +# Check for rustc and report its version +if command -v rustc >/dev/null 2>&1; then + echo "Using system rustc version: $(rustc --version)" +elif [ -x "$HOME/.cargo/bin/rustc" ]; then + echo "Using user-installed rustc version: $($HOME/.cargo/bin/rustc --version)" +else + echo "Error: rustc not found. Please install Rust using your system's package manager or from https://rustup.rs/" + exit 1 +fi + # Check the Rust installation, and abort if not available "${R_HOME}/bin/Rscript" "./tools/configure.R" - ret=$? - if [ $ret -ne 0 ]; then exit $ret fi diff --git a/configure.win b/configure.win index f1d426e..b911130 100755 --- a/configure.win +++ b/configure.win @@ -5,11 +5,19 @@ LIBRSYS_R_VERSION=$("${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "./tools/print_r_ve BEFORE_CARGO_BUILD="export LIBRSYS_R_VERSION=\"${LIBRSYS_R_VERSION}\" \\&\\&" AFTER_CARGO_BUILD='' +# Check for rustc and report its version +if command -v rustc >/dev/null 2>&1; then + echo "Using system rustc version: $(rustc --version)" +elif [ -x "$USERPROFILE/.cargo/bin/rustc" ]; then + echo "Using user-installed rustc version: $($USERPROFILE/.cargo/bin/rustc --version)" +else + echo "Error: rustc not found. Please install Rust from https://rustup.rs/" + exit 1 +fi + # Check the Rust installation, and abort if not available "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "./tools/configure.R" - ret=$? - if [ $ret -ne 0 ]; then exit $ret fi diff --git a/cran-comments.md b/cran-comments.md index 5220b31..49e68a8 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,27 +2,10 @@ 0 errors | 0 warnings | 2 note -* This is a new release. +* Added rustc version reporting in the installation log as per CRAN policy. ## Note 1 -* checking CRAN incoming feasibility ... NOTE -Maintainer: 'Xianying Tan ' - -New submission - -Package was archived on CRAN - -CRAN repository db overrides: - X-CRAN-Comment: Archived on 2024-07-31 as check problems were not - corrected despite reminders. - -The package was archived on CRAN due to the underlying Rust code -calling non-API entry points in R. This issue has now been resolved. -We apologize for not addressing this before the July 31, 2024 deadline. - -## Note 2 - * checking installed package size ... NOTE installed size is 7.7Mb sub-directories of 1Mb or more: @@ -31,3 +14,13 @@ We apologize for not addressing this before the July 31, 2024 deadline. The size of the package can't be reduced further as it has to bundle all the Rust cates dependencies to avoid the downloading during installation issue. + +## Note2 + +* checking CRAN incoming feasibility ... [12s] NOTE +Maintainer: 'Xianying Tan ' + +Days since last update: 6 + +This recent update is to address CRAN's request to report the rustc version +in the installation log, as per the policy for Rust packages on CRAN.