rstan icon indicating copy to clipboard operation
rstan copied to clipboard

stanc: preserve blank lines in source

Open WardBrian opened this issue 1 year ago • 8 comments

Summary:

This adds the blank.lines.skip=FALSE argument to scan used in stanc_process, which fixes the issue where line numbers reported by stanc did not match the source in compiler or runtime errors.

Intended Effect:

Closes #1123

How to Verify:

The code in #1123 now yields a straight line plot as expected

Side Effects:

None

Documentation:

None

Reviewer Suggestions:

@bgoodri @andrjohns

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

  • Code: GPLv3 (https://opensource.org/licenses/GPL-3.0)
  • Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

WardBrian avatar Apr 18 '24 14:04 WardBrian

@bgoodri the failures in github actions seem to be unrelated. Do you think this could make it into a CRAN patch in the near future?

WardBrian avatar Apr 22 '24 18:04 WardBrian

Yes, although StanHeaders and / or rstanarm are more critical at the moment.

bgoodri avatar Apr 22 '24 19:04 bgoodri

Sure. I'm going to try to take another look at the rstanarm issue tomorrow, is there something else with StanHeaders?

WardBrian avatar Apr 22 '24 19:04 WardBrian

Well, we still do not know why geostan stops compiling, although the other package that was stopping is going all the way through again.

bgoodri avatar Apr 22 '24 19:04 bgoodri

@bgoodri re geostan, that looks a lot like what happens to ctsem (but ctsem is worse, https://cran.r-project.org/web/checks/check_results_ctsem.html ) , always assumed it was just timeout settings on CRAN boxes...

cdriveraus avatar Apr 24 '24 12:04 cdriveraus

Yeah, g++-13: fatal error: Killed signal terminated program cc1plus and make[1]: *** [/home/hornik/tmp/R.check/r-patched-gcc/Work/build/etc/Makeconf:200: stanExports_ctsm.o] Terminated both point to the program being killed, not encountering an error. Either running out of time or running out of memory are almost certainly to blame

WardBrian avatar Apr 24 '24 13:04 WardBrian

This is unrelated to the rstan issue with the javascript parser not preserving blank lines, but whatever.

Has anyone gotten a notice from CRAN saying their package is subject to removal due to the mysterious halting of the C++ compiler?

bgoodri avatar Apr 25 '24 00:04 bgoodri

It's been a vague concern (of mine) for years with ctsem, at some point years ago I had to remove a bunch of features to get it working on all boxes, as I had the unwanted attention of a rather infamous cran persona. Since then the termination errors have often been around, but (i think) variable in that sometimes all builds succeed, and no removal notices.

cdriveraus avatar Apr 25 '24 04:04 cdriveraus