Repository navigation
Require lintr (>= 3.3.0-1) and drop workarounds for older lintr - #783
MichaelChirico wants to merge 2 commits into
Conversation
renkun-ken
left a comment
There was a problem hiding this comment.
No blocking issues found in the diagnostics cleanup.
I reviewed commit 498a531ebb7a438854008743a9e6f55b91e43284 and ran test-lintr.R, test-code-action.R, test-literate.R, and test-diagnostics-configuration.R against the exact lintr 3.3.0-1 release on R 4.6.1. All four passed, including the editor integration tests. The corresponding unit tests also passed with lintr 3.4.0. This covered saved/new R Markdown and Quarto buffers, nested configuration, configuration reloads, custom suppression markers, file/line exclusions, and terminal-newline diagnostics and fixes. The PR's CI checks are also passing.
One non-blocking compatibility note: lintr 3.3.0-1 declares R (>= 4.0), whereas lintr 3.0.0 supported R (>= 3.2). This dependency bump therefore raises languageserver's effective minimum R version to 4.0, although DESCRIPTION still declares R (>= 3.4.0). I suggest aligning that declaration and mentioning the new lintr/R requirements in NEWS so the installation impact is explicit.
|
Do we really want to bump the minimum required R version? What do you think, @randy3k? |
|
Great point. FWIW, R 4.0.0 is approaching 7 years old: https://github.com/wch/r-source/tree/tags/R-4-0-0 |
|
I could also look into making {lintr} |
|
I checked the declared R requirements of every direct dependency, including the previously required lintr 3.0.0, to inform the minimum-R discussion. The previous lintr minimum declared R >= 3.2; the proposed minimum declares R >= 4.0. The updated DESCRIPTION now makes languageserver's R >= 4.0.0 requirement explicit. Using all current CRAN releases instead gives an R >= 4.1 floor: fs, lintr, and roxygen2 require it directly, and no package in the recursively required current dependency tree declares a higher floor. lintr version comparison
Required packages (Imports)
Optional packages (Suggests)
“Not declared” means that release has no explicit R version constraint in Depends; it does not establish compatibility with every R version. “Unbounded” means languageserver sets no package version lower bound, so there is no exact historical minimum release to inspect. These are DESCRIPTION metadata checks, not runtime compatibility tests. At the exact package versions specified as lower bounds, lintr 3.3.0-1 is the only direct dependency explicitly requiring R >= 4.0. The current CRAN requirements do not establish that languageserver must require R >= 4.1: older compatible dependency releases can satisfy its package version constraints. Moving lintr to Suggests could therefore help preserve older-R support for other functionality, but older compatible releases of other dependencies would still be needed; that change alone would not make the full current CRAN dependency set installable below R 4.1. Sources: current CRAN package metadata, checked on 6 October 2026; linked archived releases for the exact minimum versions; and lintr 3.0.0's tagged DESCRIPTION linked above. |
|
OK, so basically, while it's technically possible to run current {languageserver} using archived versions of its dependencies that still satisfy its stated version requirements, doing so is pretty onerous -- it's very likely that anyone that installs {languageserver} today does so with an effective R version minimum of 4.1.0 because that's what would be required for installing directly from CRAN. (and this assumes that the stated version requirements for the other dependencies are indeed accurate) |
|
Bumping the minimum to R 4.0 is reasonable as a deliberate decision to end R 3.x support. The main benefit is easier maintenance; the main cost is excluding older environments from the entire language server. The practical impact is:
Pros
Cons
The dependency audit establishes that fresh installations using all current CRAN releases need R >= 4.1. It does not establish how many users still rely on older, working environments. We have no usage data to quantify that group, so the current-CRAN floor is evidence of limited impact for that installation path, not evidence that dropping R 3.x has no practical cost. Recommendation: accept R >= 4.0 if maintainers intend to retire R 3.x support, document the breaking change and last compatible languageserver release, and validate installation and core behavior on R 4.0 with compatible dependencies. If preserving R 3.x remains a goal, making lintr optional deserves consideration: it could retain other editor features while requiring newer R for diagnostics, at the cost of additional feature checks and tests. Supporting those older environments would still require compatible versions of the other dependencies. |
FWIW, such users should not find it difficult to keep using a pinned old version languageserver as well |
In #774 and #775, I noticed {languageserver} has found itself needing to use several private functions from {lintr}.
So I set up an audit of such usage in order to decide what gaps there are in {lintr}'s API so we can export some more meta-helpers that packages such as {languageserver} could avail themselves of.
The first step in the audit found that there are a number of "crutches" in place allowing {languageserver} to depend on older versions of {lintr}; I find that extended back-compatibility for CRAN packages is not as useful as doing so for "tougher" dependencies (e.g. R itself).
So here, I propose bumping the version requirement for {lintr} to 3.3.0-1 (Nov 2025, so about a year by the time {languageserver} lands on CRAN), as well as some clean-up of {languageserver} internals enabled by this bump.