Skip to content

Commit

Permalink
Added rustc version reporting in the installation log as per CRAN policy
Browse files Browse the repository at this point in the history
  • Loading branch information
shrektan committed Aug 23, 2024
1 parent fb0be88 commit 6716933
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-6072-3521")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 10 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 11 additions & 18 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>'

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:
Expand All @@ -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 <[email protected]>'

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.

0 comments on commit 6716933

Please sign in to comment.