rstan icon indicating copy to clipboard operation
rstan copied to clipboard

Out of date `GitRev` on startup

Open jeffreypullin opened this issue 4 years ago • 1 comments

Summary:

The GitRev shown on startup is (badly) out of date.

Description:

On startup I see the following:

Loading required package: StanHeaders
Loading required package: ggplot2
rstan (Version 2.21.2, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)

the GitRev shown come from the last entry of the file git_rstan_head() and the commit it refers to is from 2016!

I suggest that either:

  • GitRev is removed from the startup message, or
  • A way is found to automate the retrieval of the latest git commit (I can't think of a way to do this without heayish dependencies)

Related to this, I think it may be useful to have a way to retrieve the versions of all the stan components rstan is using i.e the versions of Stan, Stan math, stanc3 and rstan. This would be useful for diagnosing issues such as #913 and could be shown on startup.

Thanks!

jeffreypullin avatar Feb 23 '21 04:02 jeffreypullin

@jeffreypullin Good catch! I've replaced GitRev with Stan version. Math should have a fixed version for Stan releases. The version of stanc3 is included in the generated C++ code and can be printed by passing the --version argument (see https://github.com/stan-dev/stanc3/pull/524), which isn't currently supported/needed by rstan::stanc().

hsbadr avatar Mar 01 '21 16:03 hsbadr