Skip to content

Commit

Permalink
change in inline compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
hanase committed Oct 17, 2024
1 parent c85dc46 commit dad53ba
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4
Expand All @@ -45,18 +46,26 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf", "--as-cran")'

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v4
- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
7 changes: 4 additions & 3 deletions R/iBMA.glm.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ https://github.com/SurajGupta/r-source/blob/master/src/main/envir.c

src <- '
if (TYPEOF(env) == NILSXP)
perror("use of NULL environment is defunct");
error("use of NULL environment is defunct");
if (TYPEOF(env) != ENVSXP)
perror("not an environment");
error("not an environment");
UNLOCK_FRAME(env);
Expand All @@ -42,7 +42,8 @@ return result;

unlockEnvironment <- cfunction(signature(env = "environment"),
includes = inc,
body = src)
body = src,
language = "c")


nsEnv <- asNamespace('BMA')
Expand Down
9 changes: 5 additions & 4 deletions R/iBMA.surv.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ https://github.com/SurajGupta/r-source/blob/master/src/main/envir.c

src <- '
if (TYPEOF(env) == NILSXP)
perror("use of NULL environment is defunct");
error("use of NULL environment is defunct");
if (TYPEOF(env) != ENVSXP)
perror("not an environment");
error("not an environment");
UNLOCK_FRAME(env);
Expand All @@ -43,8 +43,9 @@ return result;

unlockEnvironment <- cfunction(signature(env = "environment"),
includes = inc,
body = src)

body = src,
language = "c")

nsEnv <- asNamespace('BMA')
unlockEnvironment(nsEnv)
nsEnv$glob <- function() {
Expand Down

0 comments on commit dad53ba

Please sign in to comment.