Skip to content
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.32] Delay expiring syntax deprecations one version #1303

Merged
merged 3 commits into from
Apr 3, 2023

Conversation

WardBrian
Copy link
Member

@WardBrian WardBrian commented Mar 31, 2023

Following discussions on the forums this PR is prepared as an alternative to #1287 for this version which moves the removal version of syntax changes back to 2.33. This should avoid a situation where it is impossible to write Stan programs which can't be compiled by both RStan and CmdStan.

Submission Checklist

Release notes

Syntax removals scheduled for this version have been pushed back to 2.33. We still recommend updating your Stan models as you are able. As a reminder, deprecated syntax which will be removed in minor versions can as a rule be updated automatically using find-and-replace tools or the Stan compiler's auto-formatting abilities.

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)

@WardBrian
Copy link
Member Author

@andrjohns I assume it is okay to remove the command-line arguments we had deprecated for this version still, right?

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Merging #1303 (d089a82) into master (06679e7) will decrease coverage by 0.04%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #1303      +/-   ##
==========================================
- Coverage   89.09%   89.06%   -0.04%     
==========================================
  Files          64       64              
  Lines        9758     9756       -2     
==========================================
- Hits         8694     8689       -5     
- Misses       1064     1067       +3     
Impacted Files Coverage Δ
src/frontend/Input_warnings.ml 85.00% <ø> (ø)
src/frontend/Typechecker.ml 89.87% <ø> (ø)
src/stanc/stanc.ml 81.96% <33.33%> (-2.59%) ⬇️
src/frontend/Deprecation_analysis.ml 92.30% <100.00%> (ø)
src/middle/Stan_math_signatures.ml 98.05% <100.00%> (-0.01%) ⬇️

@WardBrian
Copy link
Member Author

@rok-cesnovar this will need to go in before the freeze (I think we have a checklist item on the release checklist for this kind of thing, but just double-checking)

@nhuurre
Copy link
Collaborator

nhuurre commented Apr 1, 2023

#1287 doesn't just remove syntax, it has a couple of fixes that could go here as well

  • add deprecation warnings to stancjs
    let deprecation_warnings =
    if canonicalizer_settings.deprecations then []
    else Deprecation_analysis.collect_warnings typed_ast in
    let warnings = warnings @ deprecation_warnings in
  • add lkj_cov_lpdf:
    ; ([Lpdf; Log], "lkj_cov", [DMatrix; DVector; DVector; DReal], AoS)

@andrjohns
Copy link
Contributor

@andrjohns I assume it is okay to remove the command-line arguments we had deprecated for this version still, right?

Yep that should be fine AFAIK. I'll run the rstan & StanHeaders unit tests with this stanc and open a PR for rstan with anything we'll need to update internally

@WardBrian WardBrian requested a review from nhuurre April 3, 2023 13:55
@WardBrian WardBrian merged commit cafcd69 into master Apr 3, 2023
@WardBrian WardBrian deleted the deprecations/2-32-delay-2-33 branch April 3, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants