Skip to content

Commit

Permalink
Merge pull request #117 from stan-dev/stanfunctions-2.33+
Browse files Browse the repository at this point in the history
Fix packages with stanfunctions under rstan 2.33+
  • Loading branch information
andrjohns authored Sep 12, 2023
2 parents fcd263a + b280a5e commit 4efe8ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/check-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::. rcmdcheck BH RcppParallel RcppEigen Rcpp rstan StanHeaders RCurl remotes
extra-packages: local::. rcmdcheck BH RcppParallel RcppEigen Rcpp rstan StanHeaders RCurl remotes V8

- name: Checkout lgpr package
run: |
git clone https://github.com/jtimonen/lgpr
git clone https://github.com/andrjohns/lgpr
cd lgpr && git checkout array-syntax
- name: Check against CRAN StanHeaders and CRAN RStan
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck BH RcppParallel RcppEigen Rcpp rstan StanHeaders
extra-packages: rcmdcheck BH RcppParallel RcppEigen Rcpp rstan StanHeaders V8

- name: Check against CRAN StanHeaders and CRAN RStan
uses: r-lib/actions/check-r-package@v2
Expand Down
2 changes: 1 addition & 1 deletion R/rstan_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ rstan_config <- function(pkgdir = ".") {
# Stanc3 gives 'auto' return type for standalone functions, which
# causes errors with Rcpp::export, so need to replace the auto
# return with the plain type from the main definition
if(utils::packageVersion('rstan') >= "2.26") {
if(utils::packageVersion('rstan') >= "2.26" && utils::packageVersion('StanHeaders') < "2.33") {
# Extract line numbers of functions to be exported
decl_lines = grep("// \\[\\[Rcpp::export]]",cpp_lines) + 1

Expand Down

0 comments on commit 4efe8ff

Please sign in to comment.