rstan icon indicating copy to clipboard operation
rstan copied to clipboard

.Call() with symbols, not strings

Open MichaelChirico opened this issue 1 year ago • 1 comments

On my (rather baroque!) installation of R 4.4.1, loadNamespace("rstan") fails:

Error: package or namespace load failed for ‘rstan’:
 .onLoad failed in loadNamespace() for 'rstan', details:
  call: get_rng(0)
  error: DLL requires the use of native symbols
Error: loading failed

Per https://stackoverflow.com/q/76689311/3576984, there seems to be some (ongoing?) evolution on supplying routine names as strings, when they're registered and available as symbols.

Regardless of whether this is causing errors, I do think using the symbols when possible is preferable, hence filing this PR even though the issue I observe is not necessarily reproducible. c.f. lintr::routine_registration_linter().

MichaelChirico avatar Oct 31 '24 22:10 MichaelChirico

Thanks. @bgoodri can hopefully take a look, but seems fine to me to make this switch.

jgabry avatar Oct 31 '24 23:10 jgabry