Repository navigation
fix sccache wiring + Windows server race, macOS panmirror packaging, Global Options TypeError, and shiny test stability - #17994
Conversation
…ches the Windows compile rules
🍎 macOS Desktop E2E · ARM64✅ All tests passed!
📥 Download Playwright report⬇️ playwright-report.zip — extract and open
2 shards · macos-26 ARM64 · commit |
🪟 Windows Desktop E2E · Server 2025 x64✅ All tests passed!
📥 Download Playwright report⬇️ playwright-report.zip — extract and open
2 shards · Windows Server 2025 x64 · commit |
…al rule body lives
…l.exe (sccache 0.15.x bails on @DYNDEP_MODULE_MAP_FILE silently, killing all caching)
…che silently does nothing; revert the unneeded CXX_SCAN_FOR_MODULES OFF
… 4226 bind race that was killing the build
…-rules diagnostic
|
LGTM — re-reviewed on the latest commit and the previous diagnostics issue is fixed. The sccache wiring/debug changes, the panmirror output path correction, and the shiny test stabilization all look good from a correctness standpoint. Only remaining gate is CI completion (macOS/Windows build jobs are still pending). — Review from GitHub Copilot (powered by GPT-5.3-Codex, model ID: gpt-5.3-codex). |
Code review findingsActionable items from an automated multi-agent review. Critical
Important
Suggestions
|
gtritchie
left a comment
There was a problem hiding this comment.
feedback attached, please review and address any findings you think are worth doing; I don't think this needs a NEWS entry (Claude always worries about that).
…EditorPreview guards, drop diag scaffolding, polish NEWS + comments
…windows-sccache-wiring
Intent
Make Windows and macOS PR builds reliable and fix three real product/test issues that surfaced while investigating the slow Windows compile path.
This PR groups four fixes that were diagnosed together:
sccache --show-statsconsistently reportedCompile requests: 0. Two separate causes were in play: a CMake launcher wiring problem affecting both platforms, and a Windows-specific server bind race.render quarto document,spellcheck in visual mode,rmd templates display) failed deterministically on macOS becausepanmirror.jsreturned 404 — the bundle was missing from the installed package whenever the macOS GWT cache hit (--build-gwt=0).shiny-app-window-close.test.tsweretest.fixme'd on Windows because the R-side interrupt was unreliable, and the macOS path had a race between shiny's initial-binding pass and the test's interrupt.Approach
sccache wiring (
cmake/modules/sccache.cmake):CMAKE_<LANG>_COMPILER_LAUNCHERasCACHE STRING "..." FORCE(launcher-only, not alsoRULE_LAUNCH_COMPILE). On the Ninja generator the two stack additively rather than acting as fallbacks; setting both produces compile rules likesccache sccache c++ -E ...and breaks withCompiler not supported: unexpected argument '-E' found. The file's comment documents the constraint./Zi→/Z7so parallelcl.exeinvocations don't fight over a shared PDB (which causes C1041 errors with sccache). Three layers:add_compile_options(/Z7),CACHE FORCEto strip/Zi, andCMP0141.Windows sccache server race (
.github/workflows/os-test-e2e-rstudio-desktop-os-windows-server-2025.yml):sccache.exe --start-serverwithSCCACHE_IDLE_TIMEOUT=0. On Windows each parallelcl.execompile spawns its ownsccache.exewhich tries to bind127.0.0.1:4226; without a pre-started server the first one wins and the rest exit with WSAEADDRINUSE (os error 10048). After this change, Windows sccache hit rate went 0 → 98.31%.-SimpleMatch+ backtick escapes prevented it from running anyway), and the upload-ninja-files step — diagnostic scaffolding from the root-cause investigation that's no longer needed.macOS panmirror packaging (
src/gwt/build.xml):panmirror.build.dir = ${www.dir}/js/panmirror(was hardcoded to./www/js/panmirror). cmake on macOS overrideswww.dirto a build-tree absolute path; the prior relative path resolved to the source tree instead, so panmirror dropped out of the cached gwt build-tree directory. On Windows/Linux/local wherewww.dirdefaults to./www, the resolved path is unchanged. The cache key already hashesbuild.xml, so the stale cache invalidates automatically and the next run reseeds with panmirror inside.Global Options TypeError (
src/gwt/src/org/rstudio/studio/client/workbench/prefs/views/AceEditorPreview.java):ExternalJavaScriptLoader.onLoadedcallbacks were dereferencinggetWindow().getDocument()on a detached iframe (Global Options dismissed before Ace finished loading).getDocument()inDynamicIFrameisgetWindow().getDocument()over JSNIreturn this.document— on a detached framegetWindow()returns null andnull.documentraises the TypeError surfaced as an Error dialog.isAttached()+ null-window / null-document guards fix shiny app window becoming unclosable and orphaned #17920 applied tosetLineHeight, extended to the outer/inneronLoadedcallbacks and tosetTheme/setFontSize/setFontfor completeness.Shiny test stability (
e2e/rstudio/tests/shiny/shiny-app-window-close.test.ts,ApplicationAutomation.java,e2e/rstudio/utils/commands.ts):window.rstudio.shiny.stopForegroundApp()automation bridge that calls the existingstop_shiny_appJSON-RPC handler (which invokesshiny::stopApp()on the R side). Test 1 ("window closes when the app is stopped") now uses this bridge instead of clicking the interrupt button. Interrupt depends onR_interrupts_pendingbeing polled inside runApp's event loop — unreliable on Windows where the OS usesCTRL_BREAK_EVENTrather than SIGINT. The RPC goes through shiny's normal shutdown on every platform, which lets the three Windowstest.fixmes come off.waitForTimeout(500)inwaitForShinyIdlewith a stability-countedexpect.poll(5 consecutiveshiny-busy=falsesamples at 100ms intervals) — a measurable condition pere2e/rstudio/docs/ANTIPATTERN_CLEANUP.md.ensureConsoleIdlein the afterAll hook withtry/finallyso a still-busy R can't leak the temp app dir into the next worker.ensureConsoleIdlenudge loop down to a single retry — repeatedinterruptRcalls against a stuck R stack "Terminate R" confirmation dialogs in the IDE.Automated Tests
This is a CI infrastructure / latent-bug PR with no new product feature, so verification is the next CI runs on this branch:
sccache --show-statsreports non-zero compile-requests (saw 98.31% hit rate after the fix).test.fixmeskip.QA Notes
The AceEditorPreview change is the only user-observable behavior change here; the rest are CI / build-system.
To exercise the AceEditorPreview fix manually: open Tools > Global Options, switch to the Appearance pane (which mounts the editor theme preview), and dismiss the dialog quickly via Cancel/Escape before the preview finishes loading. Previously this could surface an "Error" dialog reading "Cannot read properties of null (reading 'document')"; that dialog should no longer appear.
Documentation
NEWS.mdentries added under### Fixed:The build-system changes (sccache wiring, Windows server pre-start, workflow scaffolding removal, shiny automation bridge, build.xml panmirror path) need no admin/user docs.
Checklist
NEWS.md