-
Notifications
You must be signed in to change notification settings - Fork 420
Description
Runtime directory path inconsistency on Linux
xdgUserRuntimeDir in src/core/appdirs.ts is the only XDG directory function that does not append the application name ("quarto") to the base path when XDG_RUNTIME_DIR is set. All other XDG functions (xdgUserDataDir, xdgUserConfigDir, xdgUserCacheDir) follow the pattern join(envVar, appName).
This means on Linux with XDG_RUNTIME_DIR=/run/user/1000:
quartoCacheDir("julia")→/run/user/1000/.cache/quarto/julia✓quartoRuntimeDir("julia")→/run/user/1000/julia(noquarto/segment)
Two subsystems use quartoRuntimeDir: the Julia engine ("julia" subdir for transport, log, and project files) and the Jupyter kernel ("jt" subdir for transport files).
This was introduced in 179f686 (Jan 2021) and has never been changed. It appears to be an oversight — the appName parameter is accepted but unused in the XDG_RUNTIME_DIR branch, and the fallback branch delegates to xdgUserDataDir(appName) which does append it.
Options
-
Fix
xdgUserRuntimeDirto appendappName, matching all other XDG functions. SinceXDG_RUNTIME_DIRis typically tmpfs (cleared on reboot/logout), the impact is limited to a single session: any running Julia server or Jupyter kernel would become invisible to quarto at the new path, requiring a restart. After the next reboot, no trace of the old path remains. The julia-engine test's reimplementation of this logic already assumesappNameis appended, so this would fix the test without any change on their side. -
Keep the current behavior and update the julia-engine test to match. We've pushed a temporary workaround (0d4dfe5) to get CI green. If we decide the current behavior is intentional (or not worth changing), we can push this fix upstream to PumasAI/quarto-julia-engine and call it done. This leaves the inconsistency in place and requires anyone reimplementing the path logic to know about the special case.