Skip to content

expose_functions() method of CmdStanModel fails with mysterious error message #830

Closed
@ksvanhorn

Description

@ksvanhorn

Describe the bug
Calling model$expose_functions() with a CmdStanModel object results in the error message

Error in function_env$external && cmdstan_version() < "2.32" :
  invalid 'x' type in 'x && y'

To Reproduce

  1. Create a model object m.
  2. m$expose_functions()

Expected behavior
Either expose the functions or give an informative error message.

Operating system
macOS Ventura 13.4

CmdStanR version number
0.6.0.9000

Additional context
cmdstan_version() returns 2.31.0, so there should be an error message printed here. Investigating with the debugger, I find that function_env only has one name in it, compiled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions