-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Stan 2.33] Make expiring deprecations into errors #1287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should change Middle.Fun_kind.suffix_from_name
too since it makes use of the deprecated _log
suffix.
The new Deprecation_removals.ml
is mostly a copy of Deprecation_analysis.ml
, right? What's your opinion on keeping them together, like, instead of Deprecation_analysis.collect_warnings
you'd have Deprecation_analysis.collect_warnings_and_removals
that returns two lists?
I like having it separate because I'm optimizing this code for deletion. It would be nice to combine logic (like for deprecated functions, currently the way this works is basically like having an If you feel strongly about it I can merge the two - would you want the functions themselves to be merged (so we only walk the AST once) or just move over the contents of the removal module and define |
In that case it makes sense to keep them separate but I'd consider re-integrating them in the next version. |
Thanks @nhuurre. I'm going to wait to merge until I write the documentation PR early next week |
@nhuurre while writing up the doc I realized the nested lvalue issue is also expiring. Care to take one last glance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
f935cc4
to
fddefdd
Compare
Updating now following #1303 We will not merge this until during the 2.33 development cycle |
Codecov Report
@@ Coverage Diff @@
## master #1287 +/- ##
==========================================
- Coverage 89.32% 89.13% -0.20%
==========================================
Files 64 65 +1
Lines 10588 10632 +44
==========================================
+ Hits 9458 9477 +19
- Misses 1130 1155 +25
|
@nhuurre mind taking another look at this after the various merges that have been necessary? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good.
This adds some (primarily temporary) code which is modeled off the current
Deprecation_analysis
model but is used to generate errors rather than warnings.Submission Checklist
Release notes
The following deprecations have been turned into errors this version:
int arr[5];
. Usearray[5] int arr;
instead._log
. Use either_lpdf
or_lpmf
.binomial_coefficient_log
,multiply_log
, andcov_exp_quad
. Uselchoose
,lmultiply
, andgp_exp_quad_cov
respectively.if_else
function. Use the ternary operatorcond ? true_value : false_value
,
between the first and second argument. Use a|
.#
. Use//
.<-
for assignment. Use=
.increment_log_prob
function. Use thetarget +=
statement.get_lp()
function. Usetarget()
.For this version, these can all be automatically updated with the
--canonicalize=deprecations
argument to the autoformatter. This is not guaranteed to work for versions following this one.Additionally, the following identifiers are now reserved words:
array
,offset
,multiplier
,lower
, andupper
.Copyright and Licensing
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)