Repository navigation
Description
Summary
After #17824, the Windows CI Tests stage runs only the core scope.
Other platforms run substantially more, leaving Windows-specific
regressions in several areas uncovered by CI.
Coverage gaps
jenkins/Jenkinsfile.windows still invokes only core:
bat 'cd package/win32/build/src/cpp && rstudio-tests.bat --scope core'
rstudio-tests.bat itself now accepts every scope the Unix runner does
(core, rserver, rsession, r), so what remains is a gap in what CI
asks for rather than in what the runner can do:
rsessionandrare supported by the batch script but not invoked by
the Jenkinsfile. Running all scopes in CI was attempted and reverted
(7f7d9be, see comment below) pending investigation of the failures.rserverhas nothing to run on Windows: those tests are not built on
the platform, so the scope prints a skip notice and passes.shared_coreis not a separate scope. It runs as part ofcore, along
withserver_corewhere that is built.
For comparison:
- Linux (
jenkins/Jenkinsfile.linux): four separate invocations --
core,rsession,rserver,r - macOS (
jenkins/Jenkinsfile.macos) and PR build: bare./rstudio-tests,
which runs all available scopes - Windows (
jenkins/Jenkinsfile.windows):coreonly
Runner interface (addressed)
When this issue was filed the two helper scripts used divergent argument
syntax: the bash rstudio-tests took --scope <name>, while
rstudio-tests.bat took bare positional tokens. That mismatch is what
silently disabled Windows tests between #14883 and #17824.
#18069 gave rstudio-tests.bat the same --scope / --filter interface as
the Unix runner, added the r scope, and made the script propagate
failures -- any failing suite now exits 1, where the positional wrapper
always exited 0.
#18384 takes the Windows runner one step further: --scope accepts more
than one scope per invocation, in any of three equivalent forms:
rstudio-tests.bat --scope core,rsession
rstudio-tests.bat --scope core rsession
rstudio-tests.bat --scope core --scope rsession
Scopes always run in core, rserver, rsession, r order regardless of
the order requested, and an unrecognized name fails before any suite runs.
The Windows Tests stage can therefore cover several scopes in a single
bat step, rather than one step per scope as on Linux. The Unix
rstudio-tests still takes a single scope per invocation.
Remaining work
- Investigate and fix the failures that caused 7f7d9be, so the
rsession
andrscopes pass on the Windows agents. - Add those scopes to the Windows
Testsstage once they are stable, as a
single invocation -- e.g.rstudio-tests.bat --scope core,rsession,r.
Activity
gtritchie commentedon Jun 27, 2026
Lot's o-failures attempting to run all tests in CI. Reverted until I have a change to investigate and fix.
Revert: 7f7d9be
Run the rsession test scope on Windows CI (#18810)
Run all test scopes on Windows CI (#18822)
gtritchie commentedon Sep 15, 2026
Reopening: #18822 (run all test scopes) and #18830 (install testthat on the Windows image) are both being reverted in #18834.
The
rscope can't run on Windows CI as things stand.docker/jenkins/Dockerfile.windowsinstalls R 3.6.3, and CRAN serves no Windows binaries belowbin/windows/contrib/4.0(contrib/3.6/PACKAGESis a 404). Current sources need a newer R regardless — testthat 3.3.2 and purrr 1.2.2 require R >= 4.1.0, rlang 1.3.0 requires R >= 4.0.0.So this needs one of:
Dockerfile.windows(kept in sync withdependencies/windows/Install-RStudio-Prereqs.ps1, which also pins 3.6.3) to >= 4.1. The real fix, but it changes the R that the Windows build and thersessionscope run against.Either way the follow-up has to touch
docker/ordependencies/— or run withFORCE_BUILD_DOCKER=true, OS_FILTER=windows— or thechangesetgate onRebuild Docker Imagesnever fires and the image tag stays stale.Revert running all test scopes on Windows CI (#18834)
gtritchie commentedon Sep 15, 2026
Why R 3.6.3 is pinned on the Windows image, and what actually constrains it
Follow-up investigation into what it would take to get the
rscope running. Summary: the reason usually given for the pin -- that we must link against the oldest supported R's DLLs so RStudio works with that version -- does not hold. There is a hard ceiling on the R version, but it is the 32-bit build, and it lands on R 4.1.3, which is enough to install testthat.The linking argument does not hold
The premise is reasonable as a conservative strategy: the Windows loader resolves every import eagerly at DLL load, so a single R symbol missing from the runtime
R.dllfailsrsession.dlloutright. Building against the oldest supported R guarantees by construction that the import set exists there.But the import set is determined by what RStudio's own object files reference, not by which R generated the import library:
cmake/modules/FindLibR.cmake:176runssrc/cpp/tools/dll2lib.R, whichdumpbin /EXPORTS-es each R DLL into a names-only.def(no ordinals) and callslib.exe /def:. Binding is by symbol name.Nothing in
src/cppdefinesUSE_RINTERNALS. Where RStudio needs R's internal struct layouts it hand-mirrors them insrc/cpp/r/include/r/RSexpInternal.hpp("accurate for R >= 3.5"), so that ABI comes from our source, not R's headers.There are no
R_VERSIONconditionals anywhere.src/cpp/r/include/r/RRuntime.hpp:29states the intent directly:RRuntime.cppresolves newer-R symbols (R_ClosureFormals4.5+,R_getVarEx4.6+,R_GetBindingType4.6+) throughLoadLibrary/GetProcAddresswith old-R fallbacks.RSTUDIO_R_VERSION_REQUIRED(cmake/globals.cmake:317) is3.6.0-- a build-time floor, not a ceiling.Linux is consistent with this: the jammy image builds against Ubuntu 22.04's
r-base(R 4.1.2,docker/jenkins/Dockerfile.jammy:69) while supporting older R. That is supporting evidence rather than decisive, though -- ELF binds lazily through the PLT, so a Linux build would tolerate a stray newer-R import that never gets called, where Windows would not. The design intent above is the stronger argument.The pin's history offers no justification either:
489a4ed37b(Apr 2021) is just "install R 3.6.3 (up from 3.5) via PowerShell bootstrapper."The real ceiling is the 32-bit build
package/win32/make-package.bat:44-48setsMULTIARCH=1wheneverJENKINS_URLis defined.package/win32/make-install-win32.bat:62configures the i386 session, andsrc/cpp/CMakeLists.txt:502setsLIBR_FIND_WINDOWS_32BIT, which points FindLibR atLIBR_HOME/bin/i386.R 4.2.0's NEWS: "Support for 32-bit builds has been dropped." So the
x86\rsession.exewe sign and ship cannot be built with R >= 4.2. R 4.1.3 is the newest R that still shipsbin/i386.R 4.1.3 is enough for testthat
CRAN's frozen
bin/windows/contrib/4.1carries Windows binaries for the entire default package set -- no Rtools needed:R-4.1.3-win.exeis still published on CRAN. For contrast,bin/windows/contrib/3.6is a 404 -- CRAN serves no Windows binaries below 4.0 -- and current sources need R >= 4.1 anyway (testthat 3.3.2, purrr 1.2.2) or R >= 4.0 (rlang 1.3.0). That is why #18830 could not work.If we bump to 4.1.3
Touch points:
docker/jenkins/Dockerfile.windows:108-117(download + PATH)dependencies/windows/Install-RStudio-Prereqs.ps1:136-149package/win32/make-package.bat:204package/win32/make-install-win32.bat:62R-4.1.3-win.exeto the rstudio-buildtools bucket, which both installers fetch fromThen re-enable the
rscope injenkins/Jenkinsfile.windowsand restore theinstall-packages.cmdstep.Two things to resolve first:
expect_in()(introduced in 3.1.9). Used 23 times insrc/cpp/tests/testthat/test-completions-inherit-dot-params.Rand once intest-connections.R. Trivially rewritable, but it needs doing or the scope fails.Verification the bump should carry
dll2lib.Rleaves anR.defnext to each DLL, so the subset check is cheap and should not be skipped -- do not accept the bump on the argument above alone. After building withLIBR_HOME=C:\R\R-4.1.3, rundumpbin /IMPORTSonrsession.dlland confirm itsR.dllimports are a subset of 3.6.3'sbin\x64\R.def. Same for the x86rsession.dllagainstbin\i386\R.def, and forRgraphapp.dll. A subset proves the binary loads against R 3.6.3.Unrelated, but it bit us here
Setup and Trigger Buildsinjenkins/Jenkinsfile.builddoes not depend onRebuild Docker Imagessucceeding. In hourly 2332 thewindowscell of the rebuild failed and the platform builds were triggered anyway, against the stale image tag -- which is what made #18830 look like it had simply not worked. Worth a separate issue.