Releases: stan-dev/stanc3
nightly: Merge pull request #1585 from stan-dev/jacobian-reserved-parser
v2.38.0 (13 January 2026)
-
Improved formatting and wording of compiler warnings and error messages. These
can display in color when the output is a supporting terminal. This can be
overriden with--color=neveror$STANC_COLORSset tonever.
(#1548, #1551, #1546, #1549, #1550, #1552, #1561, #1560) -
Expiring deprecation:
jacobianis now a reserved keyword. (#1573) -
Added new functions:
wiener_lcdf_defectiveandwiener_lccdf_defective for use with the wiener distribution. (#1576) -
Added new overloads to the 5/8 argument
wiener_lpdffunctions with an additional data real argument to control the precision of the gradient. (#1576) -
Command line flags like
--use-openclcan be passed multiple times once more. This is equivalent to passing them exactly once, and is only provided for backwards compatibility with existing code that may not properly prepare the arguments to the compiler. (#1541) -
--debug-mem-patternswill now output information about why each variable was not considered a candidate for the SoA optimization. (#1566) -
Autocomplete scripts (for bash, zsh, and powershell) and manpages are now available for the stanc compiler. (#1572, #1558)
-
Fixed a pedantic warning referring to a now-incorrect location in the user's guide. (#1567)
-
All warnings from pedantic mode will now have a location associated with them. (#1568)
-
The C++ generated by models with many individually named parameters should be less likely to produce errors complaining about
bracket depth exceeded. (#1542) -
Improved code generation of user-defined functions accepting tuples to resolve some C++ compilation errors. (#1556)
-
Fixed an issue where some function names like
mincould lead to conflicts with the C++ standard library if they were overloaded by a user. (#1557) -
Generated C++ now always encodes when we expect integers to become doubles. (#1577)
-
Updated C++ templating around autodiff scalars. (#1555)
-
Fixed the some of the newer constraint types not having sufficient size checks for their declarations in the generated C++. (#1563)
-
Fixed a compiler crash that could be triggered by certain nested
#includestatements. (#1564) -
Improved the formatting of long functions (either with long names or many arguments). (#1562)
-
stanc.js can request ANSI escape code styling in errors and warnings by passing
color-outputas an argument. These are supported in most browser consoles. (#1569) -
Removed unused code from Common. (#1538)
-
Cleaned up pretty-printer code. (#1527)
-
Reduced cross-module access to mutable state. (#1543)
-
Encapsulated local exception usage. (#1544)
-
Statically forbid promotion nodes in the untyped AST. (#1545)
-
Fixed inconsistency in whether locations are opaque in sexps. (#1547)
-
stanc3js will no longer try to load node modules at startup. (#1553)
-
dune build @installno longer adds stanc's testing executables to thebinfolder. (#1571) -
Cleaned up dune-project file. (#1574)
-
Updated
ocamlformatto 0.28 (#1570) -
Updated Fmt to 0.11.0 (#1537)
v2.38.0-rc1 (6 January 2026)
v2.37.0 (2 September 2025)
- Added a new constraint,
sum_to_zero_matrix, which is a matrix that sums to zero along both axes. (#1506) - Exposed the
hypergeometric_1F0,hypergeometric_2F1,hypergeometric_3F2, andhypergeometric_pFqfunctions (#1504) - All the built-in constraint types now have corresponding
_jacobian,_constrain, and_unconstrainfunctions. The first two functions are identical except for the _jacobian version will increment the target with the necessary change of variables adjustment. (#1494) - Improved the command-line argument parser for
stanc. Existing flags are still supported, but new aliases may be available. See the new and improvedstanc --helpfor details. (#1478) - The compiler now accepts
-as a model argument, in which case it reads from standard input. (#1488) - Decreased the start-up overhead of the compiler. (#1496, #1498)
- Fixed a bug with assigning to an entire vector or matrix using
:with the--O1flag. (#1508) - Fixed a few functions being labeled as supporting the struct-of-arrays matrix type when they in fact did not. (#1540)
- Updated code generation of tuples to avoid issues with dangling references and some generated code being uncompilable. (#1535)
- The MacOS binaries we distribute are now 'universal' (fat) binaries, and therefore will not require Rosetta to run. (#1483, #1501)
- Updated our build process to make it easier to maintain. Note: Stan is no longer building binaries for the mips64le architecture. (#1495)
- Removed usages of the
relibrary (#1489) stanc.jswill now properly complain if it is supplied with incorrect javascript types for its arguments. (#1475)stanc.jsandstanc.exenow share significantly more code between them. (#1477)- Fixed an issue where repeated calls to
stanc.jswould re-use the same model namespace in the generated C++ (#1492) - Updated
js_of_ocamlversion to 5.9.1 (#1484) - Updated
fmtversion to 0.10.0 (#1512)
v2.37.0-rc3 (18 August 2025)
v2.37.0-rc4 (22 August 2025)
Merge pull request #1540 from stan-dev/fix/mislabeled-scalar-function…
v2.37.0-rc2 (12 June 2025)
v2.37.0-rc1 (5 June 2025)
v2.36.0 (10 December 2024)
- Removed code following the last round of syntax deprecations that is currently scheduled. The final one (use of
realvalues in conditionals) is now a type error and can no longer be automatically canonicalized. (#1420) - Added the
jacobian +=statement, an analogue oftarget +=but which can be conditionally disabled by Stan's algorithms when a unadjusted estimate is required. (#1435, #1437, #1471) - Added
stochastic_row_matrixandstochastic_column_matrixtransforms for matrix types. (#1442) - Added the
sum_to_zero_vectortransform for vector types. (#1443) - Added distribution: beta_neg_binomial, with corresponding lpdf, cdf, lcdf, lccdf, and rng functions. (#1452, #1459, #1467)
- Added all-vector signatures to the newer versions of
wiener_lpdf. (#1451) stanc.jscan now accept models which contain#includestatements. A fourth argument is available on the javascript stanc function which must be eitherundefinedor a object mapping included file names to Stan source code as strings. (#1433)- Enabled OpenCL support for the
binomial_logitandbinomial_logit_glmdistributions. (#1368) - Fixed an issue where certain overloads of distributions could lead to the
~statement producing uncompilable C++. (#1466, #1474) - Fixed an issue where
operator/was not generating the correct C++ for complex linear algebra types. (#1421) - Fixed an issue where certain variable names would end up conflicting with system-specific macros in the generated C++. (#1429)
- Fixed an issue where void functions were not given the same checks as returning functions, leading to uncompilable C++ in some cases. (#1471)
- Updated parameter code generation to use
autoso that the parameter types for matrices can be Eigen maps. (#1441) - Rolled back js_of_ocaml to 5.4.0 for compatibility with QuickJS. (#1427)
- Added builds of
stanc.jswith pretty-printing and debug info. (#1440)