Add diagnostic logging to synctex to identify failure cause
Build and Deploy Verso / deploy (push) Successful in 9m42s

Logs: request params, directory used, whether output.synctex.gz
is found, and the actual synctex binary output or error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
claude
2026-06-06 16:21:35 +00:00
co-authored by Claude Sonnet 4.6
parent 170818e6fc
commit e6add1e6f0
+11
View File
@@ -563,6 +563,10 @@ async function _runSynctex(projectId, userId, command, opts) {
const compileGroup = runInOutputDir ? 'synctex-output' : 'synctex'
const defaultImageName =
Settings.clsi && Settings.clsi.docker && Settings.clsi.docker.image
logger.warn(
{ projectId, userId, buildId, editorId, directory, command, runInOutputDir },
'synctex: starting request'
)
// eslint-disable-next-line @typescript-eslint/return-await
return await OutputCacheManager.promises.queueDirOperation(
outputDir,
@@ -573,6 +577,7 @@ async function _runSynctex(projectId, userId, command, opts) {
let downloadedFromCache = false
try {
await _checkFileExists(directory, 'output.synctex.gz')
logger.warn({ directory }, 'synctex: output.synctex.gz found')
if (compileFromClsiCache) {
try {
await _checkFileExists(directory, 'output.log')
@@ -581,6 +586,10 @@ async function _runSynctex(projectId, userId, command, opts) {
}
}
} catch (err) {
logger.warn(
{ err: err.message, directory },
'synctex: output.synctex.gz not found'
)
if (
err instanceof Errors.NotFoundError &&
compileFromClsiCache &&
@@ -618,11 +627,13 @@ async function _runSynctex(projectId, userId, command, opts) {
compileGroup,
null
)
logger.warn({ command, stdout }, 'synctex: command output')
return {
stdout,
downloadedFromCache,
}
} catch (error) {
logger.warn({ err: error.message, command }, 'synctex: command failed')
throw OError.tag(error, 'error running synctex', {
command,
projectId,