@@ -25,13 +25,98 @@ as of CmdStanR 1.0.0; use the lowercase `cmdstanr_no_ver_check` forms instead.
2525` canonicalize ` . The values were shell-quoted for Make and the same quoted
2626strings were also passed to ` stanc ` directly, which rejected them. (#1227 )
2727* ` $compile() ` now enables ` allow-undefined ` for user headers supplied through
28- ` cpp_options ` , not just through the ` user_header ` argument. (#1227 )
28+ ` cpp_options ` , not just through the ` user_header ` argument. ` $check_syntax() `
29+ and ` $format() ` also now correctly enable ` allow-undefined ` for models that use
30+ a user header. (#1227 , #1234 )
2931* ` stanc ` failures during ` $compile() ` are now reported immediately, with the
3032` stanc ` error message. Previously they surfaced several steps later. (#1227 )
3133* Errors for include paths that do not exist now report the resolved absolute
3234path. (#1227 )
3335* Numeric ` stanc_options ` values such as ` list("max-line-length" = 78) ` are no
3436longer dropped. (#1233 )
37+ * ` $compile() ` now refreshes ` $code() ` and ` $variables() ` after a successful
38+ compilation. (#1228 )
39+ * ` $compile() ` now discards standalone functions exposed from an earlier
40+ version of the Stan program. They must be exposed again with
41+ ` $expose_functions() ` after a recompilation. (#1228 )
42+ * ` $compile() ` now reuses the include paths and the user header of the previous
43+ compilation when they are not supplied again. Recompiling a model that uses
44+ ` #include ` directives or a user header through the same object previously
45+ failed because those inputs were dropped. (#1234 )
46+ * ` $compile() ` now recompiles when ` include_paths ` change. Previously the model
47+ went on using the executable built against the old paths while ` $variables() `
48+ and ` $include_paths() ` described the new ones, so data and initial values were
49+ validated against a program that was not running. (#1235 )
50+ * A ` user_header ` supplied to ` cmdstan_model() ` is now used by a later
51+ ` $compile() ` . Previously it was only honored when the model was compiled
52+ immediately. (#1234 )
53+ * ` $compile() ` now accepts ` user_header = NULL ` to compile without a user
54+ header. Previously a header, once supplied, could not be removed. (#1235 )
55+ * ` $compile() ` now recompiles when the user header changes. Previously a
56+ different header was ignored if the executable was otherwise up to date. (#1235 )
57+ * ` $compile() ` now reduces duplicate ` USER_HEADER ` /` user_header ` entries in
58+ ` cpp_options ` to the one actually used, so ` $cpp_options() ` no longer reports
59+ the ignored spelling after a successful compilation. (#1235 )
60+ * A ` $compile() ` call that finds the executable up to date no longer erases
61+ ` $cpp_options() ` . (#1235 )
62+ * ` $expose_functions() ` now works after a ` $compile() ` call that found the
63+ executable up to date. (#1235 )
64+ * ` $expose_functions() ` on a model with no executable, such as one created with
65+ ` compile = FALSE ` or compiled with ` dry_run = TRUE ` , now reports that it cannot
66+ expose functions instead of failing with "argument is of length zero". (#1235 )
67+ * A failed compilation no longer moves ` $exe_file() ` or replaces the generated
68+ C++ used by ` $hpp_file() ` and ` fit$init_model_methods() ` . Previously a failure
69+ at the C++ stage left the old executable paired with model methods generated
70+ from the new program. (#1235 )
71+ * ` $compile() ` now warns when ` cpp_options ` are supplied but the existing
72+ executable is up to date, so nothing is rebuilt and the options are not applied.
73+ The check is best effort. For an executable the model object compiled itself it
74+ compares the options passed to ` Make ` against those requested, and treats
75+ anything the binary reports but was never passed as inherited from ` make/local `
76+ and so unchanged by a rebuild. For one adopted from an earlier session only the
77+ few ` STAN_* ` flags the binary reports can be checked, and anything else passes
78+ unremarked. It can also warn when nothing would in fact change: an option
79+ inherited from ` make/local ` that the binary does not report looks like a request
80+ the executable lacks, and one that was both passed explicitly and set in
81+ ` make/local ` looks like something a rebuild would drop when it would be
82+ inherited again. Use ` force_recompile = TRUE ` when a supplied option has to take
83+ effect. (#1235 )
84+ * ` $cpp_options() ` now also reports options the executable was built with that
85+ were never passed to ` $compile() ` , such as those inherited from ` make/local ` ,
86+ when the binary reports them. ` $sample() ` and friends previously refused
87+ ` threads_per_chain ` for an executable that did have threading. (#1019 , #1235 )
88+ * ` cmdstan_model() ` no longer runs the model executable twice to read its build
89+ metadata. (#1236 )
90+ * ` $cpp_options() ` no longer reports options the executable was not built with.
91+ Previously a request that did not rebuild the model was recorded as though it
92+ had, so ` $sample() ` could fail with "the model executable was built with
93+ threading enabled" for a binary that had no threading. (#1019 , #1235 )
94+ * ` $format(overwrite_file = TRUE) ` now refreshes ` $variables() ` along with
95+ ` $code() ` , which previously kept describing the program as it was before
96+ formatting. (#1235 )
97+ * ` $compile() ` now errors if the newly compiled executable cannot be installed,
98+ restoring the previous executable. Previously the replacement was unchecked, so
99+ a failure could silently leave the model with no executable at all. (#1235 )
100+ * ` $compile() ` now errors instead of installing an executable over a directory.
101+ An executable path that names a directory, which ` $exe_file() ` and
102+ ` cmdstan_model(exe_file = ) ` both accept without checking, previously had that
103+ directory renamed aside as though it were the old executable and a file put in
104+ its place. (#1235 )
105+ * ` $compile() ` now checks that it can record the compiled model before replacing
106+ the executable, so a failure at that point can no longer leave a new executable
107+ on disk that the model object knows nothing about. (#1235 )
108+ * A duplicated ` USER_HEADER ` or ` user_header ` entry in ` cpp_options ` now selects
109+ the last one, matching what ` Make ` does with repeated assignments. Previously
110+ the first was compiled with and the rest were left in ` cpp_options ` . (#1235 )
111+ * A ` USER_HEADER ` or ` user_header ` entry in ` cpp_options ` set to ` NULL ` now
112+ clears a previously configured user header instead of being ignored. It stands
113+ for an explicit ` USER_HEADER= ` , which ` Make ` takes as clearing anything set
114+ before it, so the model previously compiled with no header while continuing to
115+ report the old one. (#1235 )
116+ * A ` $compile() ` that fails because the user header does not exist now still
117+ records the header. Previously the request was discarded, so ` $check_syntax() `
118+ and ` $format() ` reported the model's own undefined functions as errors and a
119+ bare retry after creating the file compiled with no header at all. (#1235 )
35120* CmdStanModel methods now correctly handle ` #include ` directories with spaces
36121in their paths. (#820 )
37122* ` $include_paths() ` now returns absolute paths, and relative include paths are
@@ -113,6 +198,7 @@ are recompiled lazily if needed. (#1158)
113198 - ` stepsize ` (` step_size ` )
114199
115200
201+
116202# cmdstanr 0.9.0
117203
118204## General Improvements/Changes
0 commit comments