Drop pre-2.35 CmdStan support in cmdstanr v1.0#1144
Open
Conversation
Raise cmdstanr support floors and remove legacy Windows toolchain compatibility paths tied to older CmdStan versions. Core behavior updates: - Require CmdStan >= 2.35.0 across installation and path initialization flows. - Enforce version floor for install_cmdstan() inputs (version, release_url/release_file when parseable) and after archive unpack. - Reject unsupported existing installations in set_cmdstan_path()/cmdstanr_initialize(). - Keep CMDSTANR_USE_MSYS_TOOLCHAIN as deprecated/ignored with a once-per-session warning and migration guidance. Windows/toolchain cleanup: - Remove legacy MSYS/pacman/mingw32-make toolchain-install code paths. - Remove Rtools35/R3.x-specific branching and simplify toolchain path selection for current Rtools flows. R floor + compatibility cleanup: - Bump package Depends: R to >= 4.0.0. - Remove obsolete tempdir branches for R < 3.5 in code/tests. Docs and tests: - Update NEWS and install documentation, including note about using older cmdstanr releases for older CmdStan/MSYS workflows. - Add tests for archive version extraction, unsupported version rejection (including release_file and RC boundary), unsupported CMDSTAN env initialization, and ignored MSYS env warning behavior.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1144 +/- ##
==========================================
+ Coverage 87.95% 89.92% +1.96%
==========================================
Files 14 14
Lines 5935 5913 -22
==========================================
+ Hits 5220 5317 +97
+ Misses 715 596 -119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Avoid backend-specific assumptions that caused failures on WSL - The test had expected cmdstanr_initialize() to leave PATH/VERSION NULL after rejecting an unsupported CmdStan version - On WSL CI, initialization can apparently fall back to an existing supported installation, so NULL is not guaranteed.
Member
Author
|
@SteveBronder @WardBrian If we require CmdStan 2.35 in cmdstanr v1.0 then I think we can simplify a lot of the Windows toolchain stuff. But I don't fully trust myself with Windows, so would be great to get your feedback if you have time. (You don't necessarily need to look at every line of code if you don't have time, but at least at a high level do these changes make sense?). |
- Scope cmdstan_default_path(dir=...) to the provided directory and avoid unrelated WSL fallback.\n- Keep Windows toolchain debug validation aligned with is_rtools4x_toolchain_usable().\n- Add a windows-2022 (R 4.1) CI-only skip flag for pareto_smooth-dependent init tests.\n- Centralize that skip logic in a shared test helper and apply it to all affected tests.\n- Harden recursive make test subprocess env and Makefile quoting for Windows reliability.
we need `posterior::pareto_smooth()`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Submission Checklist
Summary
Some of the code was developed with the help of codex. I also had it take a look at the code changes and generate this summary:
In cmdstanr v1.0 we will only support CmdStan >= 2.35.0. Users needing older CmdStan versions can install an older cmdstanr release. This simplifies legacy compatibility code and tightens behavior around version/path handling.
Main changes:
cmdstanr_initialize().
Windows/toolchain updates:
with package logic.
WSL/path state handling:
unrelated WSL CmdStan installs when an explicit dir is provided).
Compatibility/docs/tests/CI:
fallback behavior, and WSL state reset behavior.
posterior::pareto_smooth-dependent init tests only on that configuration.
Copyright and Licensing
Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
Jonah Gabry
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses: