new_CppObject_xp .. constructor in 2.16; and how to configure TravisCI

To summarize this lengthy thread, hoping that someone finds a better solution:

  • To solve the “constructor” issue, do what Ben suggests a the top of the thread:
    constructors = list(c("SEXP", "SEXP", "SEXP")), fields = character(),
  • If you want to run on TravisCI with the simplified syntax shown above, use dist: trusty; starting from July 17, this is no longer needed, it will be the default.
  • Replace CXX_STD = CXX14 with CXX_STD = CXX11 in Makevars. Currently, this is the settings in Makevars.win anyway. This will produce a lot of warnings about “non-static data member”, but it is not an error as with the compiler that comes in the compiler of default TravisCI precise.
  • Changing to CXX11 is not future-safe, rstan 3.0 requires CXX14, but maybe someone finds better simplified travis.yml

For sure you can find a a more flexible solution using sudo:required and the imperative format; check travis.yml file of package rstanarm. I like the elegant native version.

Feel free to clone https://github.com/dmenne/teststan which is a minimal package using rstan to find a better solution with CXX14. (Hint: I wish the skeleton created by rstan would produce such a package with a sample .stan and travis support)

I also tried r-hub, which is much more flexible when it comes to C++ support. TravisCI is just a bit better integrated into the workflow for me - currently. Don’t be surprised to get an email: teststan 2.16.0: PREPERROR: This is a false-positive bug as Gabor Csardi told me.