فهرست منبع

Merge pull request #29650 from overleaf/bg-update-clsi-tests-to-2025

update clsi acceptance tests to use texlive 2025.1 by default

GitOrigin-RevId: d69e97132e87873a8b91c39494c545250298d935
Brian Gough 9 ماه پیش
والد
کامیت
67aa42a57a

+ 63 - 65
services/clsi/README.md

@@ -1,13 +1,12 @@
-overleaf/clsi
-===============
+# overleaf/clsi
 
 
 A web api for compiling LaTeX documents in the cloud
 A web api for compiling LaTeX documents in the cloud
 
 
 The Common LaTeX Service Interface (CLSI) provides a RESTful interface to traditional LaTeX tools (or, more generally, any command line tool for composing marked-up documents into a display format such as PDF or HTML). The CLSI listens on the following ports by default:
 The Common LaTeX Service Interface (CLSI) provides a RESTful interface to traditional LaTeX tools (or, more generally, any command line tool for composing marked-up documents into a display format such as PDF or HTML). The CLSI listens on the following ports by default:
 
 
-* TCP/3013 - the RESTful interface
-* TCP/3048 - reports load information
-* TCP/3049 - HTTP interface to control the CLSI service
+- TCP/3013 - the RESTful interface
+- TCP/3048 - reports load information
+- TCP/3049 - HTTP interface to control the CLSI service
 
 
 These defaults can be modified in `config/settings.defaults.js`.
 These defaults can be modified in `config/settings.defaults.js`.
 
 
@@ -15,29 +14,28 @@ The provided `Dockerfile` builds a Docker image which has the Docker command lin
 
 
 The CLSI can be configured through the following environment variables:
 The CLSI can be configured through the following environment variables:
 
 
-* `ALLOWED_COMPILE_GROUPS` - Space separated list of allowed compile groups
-* `ALLOWED_IMAGES` - Space separated list of allowed Docker TeX Live images
-* `CATCH_ERRORS` - Set to `true` to log uncaught exceptions
-* `COMPILE_GROUP_DOCKER_CONFIGS` - JSON string of Docker configs for compile groups
-* `SANDBOXED_COMPILES` - Set to true to use sibling containers
-* `SANDBOXED_COMPILES_HOST_DIR_COMPILES` - Working directory for LaTeX compiles
-* `SANDBOXED_COMPILES_HOST_DIR_OUTPUT` - Output directory for LaTeX compiles
-* `COMPILE_SIZE_LIMIT` - Sets the body-parser [limit](https://github.com/expressjs/body-parser#limit)
-* `DOCKER_RUNTIME` -
-* `FILESTORE_DOMAIN_OVERRIDE` - The url for the filestore service e.g.`http://$FILESTORE_HOST:3009`
-* `FILESTORE_PARALLEL_FILE_DOWNLOADS` - Number of parallel file downloads
-* `LISTEN_ADDRESS` - The address for the RESTful service to listen on. Set to `0.0.0.0` to listen on all network interfaces
-* `PROCESS_LIFE_SPAN_LIMIT_MS` - Process life span limit in milliseconds
-* `SMOKE_TEST` - Whether to run smoke tests
-* `TEXLIVE_IMAGE` - The TeX Live Docker image to use for sibling containers, e.g. `us-east1-docker.pkg.dev/overleaf-ops/ol-docker/texlive-full:2017.1`
-* `TEX_LIVE_IMAGE_NAME_OVERRIDE` - The name of the registry for the Docker image e.g. `us-east1-docker.pkg.dev/overleaf-ops/ol-docker`
-* `TEXLIVE_IMAGE_USER` - When using sibling containers, the user to run as in the TeX Live image. Defaults to `tex`
-* `TEXLIVE_OPENOUT_ANY` - Sets the `openout_any` environment variable for TeX Live (see the `\openout` primitive [documentation](http://tug.org/texinfohtml/web2c.html#tex-invocation))
+- `ALLOWED_COMPILE_GROUPS` - Space separated list of allowed compile groups
+- `ALLOWED_IMAGES` - Space separated list of allowed Docker TeX Live images
+- `CATCH_ERRORS` - Set to `true` to log uncaught exceptions
+- `COMPILE_GROUP_DOCKER_CONFIGS` - JSON string of Docker configs for compile groups
+- `SANDBOXED_COMPILES` - Set to true to use sibling containers
+- `SANDBOXED_COMPILES_HOST_DIR_COMPILES` - Working directory for LaTeX compiles
+- `SANDBOXED_COMPILES_HOST_DIR_OUTPUT` - Output directory for LaTeX compiles
+- `COMPILE_SIZE_LIMIT` - Sets the body-parser [limit](https://github.com/expressjs/body-parser#limit)
+- `DOCKER_RUNTIME` -
+- `FILESTORE_DOMAIN_OVERRIDE` - The url for the filestore service e.g.`http://$FILESTORE_HOST:3009`
+- `FILESTORE_PARALLEL_FILE_DOWNLOADS` - Number of parallel file downloads
+- `LISTEN_ADDRESS` - The address for the RESTful service to listen on. Set to `0.0.0.0` to listen on all network interfaces
+- `PROCESS_LIFE_SPAN_LIMIT_MS` - Process life span limit in milliseconds
+- `SMOKE_TEST` - Whether to run smoke tests
+- `TEXLIVE_IMAGE` - The TeX Live Docker image to use for sibling containers, e.g. `us-east1-docker.pkg.dev/overleaf-ops/ol-docker/texlive-full:2025.1`
+- `TEX_LIVE_IMAGE_NAME_OVERRIDE` - The name of the registry for the Docker image e.g. `us-east1-docker.pkg.dev/overleaf-ops/ol-docker`
+- `TEXLIVE_IMAGE_USER` - When using sibling containers, the user to run as in the TeX Live image. Defaults to `tex`
+- `TEXLIVE_OPENOUT_ANY` - Sets the `openout_any` environment variable for TeX Live (see the `\openout` primitive [documentation](http://tug.org/texinfohtml/web2c.html#tex-invocation))
 
 
 Further environment variables configure the [metrics module](https://github.com/overleaf/metrics-module)
 Further environment variables configure the [metrics module](https://github.com/overleaf/metrics-module)
 
 
-Installation
-------------
+## Installation
 
 
 The CLSI can be installed and set up as part of the entire [Overleaf stack](https://github.com/overleaf/overleaf) (complete with front end editor and document storage), or it can be run as a standalone service. To run is as a standalone service, first checkout this repository:
 The CLSI can be installed and set up as part of the entire [Overleaf stack](https://github.com/overleaf/overleaf) (complete with front end editor and document storage), or it can be run as a standalone service. To run is as a standalone service, first checkout this repository:
 
 
@@ -78,14 +76,14 @@ Note: if you're running the CLSI in macOS you may need to use `-v /var/run/docke
 
 
 The CLSI should then be running at <http://localhost:3013>
 The CLSI should then be running at <http://localhost:3013>
 
 
-Important note for Linux users
-==============================
+# Important note for Linux users
 
 
 The Node application runs as user `node` in the CLSI, which has uid `1000`. As a consequence of this, the `compiles` folder gets created on your host with `uid` and `gid` set to `1000`.
 The Node application runs as user `node` in the CLSI, which has uid `1000`. As a consequence of this, the `compiles` folder gets created on your host with `uid` and `gid` set to `1000`.
 
 
 ```shell
 ```shell
 ls -lnd compiles
 ls -lnd compiles
 ```
 ```
+
 > `drwxr-xr-x 2 1000 1000 4096 Mar 19 12:41 compiles`
 > `drwxr-xr-x 2 1000 1000 4096 Mar 19 12:41 compiles`
 
 
 If there is a user/group on your host which also happens to have `uid` / `gid` `1000` then that user/group will have ownership of the compiles folder on your host.
 If there is a user/group on your host which also happens to have `uid` / `gid` `1000` then that user/group will have ownership of the compiles folder on your host.
@@ -114,9 +112,7 @@ sudo chmod g+s compiles
 
 
 This is a facet of the way docker works on Linux. See this [upstream issue](https://github.com/moby/moby/issues/7198)
 This is a facet of the way docker works on Linux. See this [upstream issue](https://github.com/moby/moby/issues/7198)
 
 
-
-API
----
+## API
 
 
 The CLSI is based on a JSON API.
 The CLSI is based on a JSON API.
 
 
@@ -128,29 +124,29 @@ The CLSI is based on a JSON API.
 
 
 ```json5
 ```json5
 {
 {
-    "compile": {
-        "options": {
-            // Which compiler to use. Can be latex, pdflatex, xelatex or lualatex
-            "compiler": "lualatex",
-            // How many seconds to wait before killing the process. Default is 60.
-            "timeout": 40
-        },
-        // The main file to run LaTeX on
-        "rootResourcePath": "main.tex",
-        // An array of files to include in the compilation. May have either the content
-        // passed directly, or a URL where it can be downloaded.
-        "resources": [
-          {
-            "path": "main.tex",
-            "content": "\\documentclass{article}\n\\begin{document}\nHello World\n\\end{document}"
-          }
-          // ,{
-          //     "path": "image.png",
-          //     "url": "www.example.com/image.png",
-          //     "modified": 123456789 // Unix time since epoch
-          // }
-        ]
-    }
+  compile: {
+    options: {
+      // Which compiler to use. Can be latex, pdflatex, xelatex or lualatex
+      compiler: 'lualatex',
+      // How many seconds to wait before killing the process. Default is 60.
+      timeout: 40,
+    },
+    // The main file to run LaTeX on
+    rootResourcePath: 'main.tex',
+    // An array of files to include in the compilation. May have either the content
+    // passed directly, or a URL where it can be downloaded.
+    resources: [
+      {
+        path: 'main.tex',
+        content: '\\documentclass{article}\n\\begin{document}\nHello World\n\\end{document}',
+      },
+      // ,{
+      //     "path": "image.png",
+      //     "url": "www.example.com/image.png",
+      //     "modified": 123456789 // Unix time since epoch
+      // }
+    ],
+  },
 }
 }
 ```
 ```
 
 
@@ -167,21 +163,23 @@ URLs will be downloaded and cached until provided with a more recent modified da
 
 
 ```json
 ```json
 {
 {
-    "compile": {
-        "status": "success",
-        "outputFiles": [{
-            "type": "pdf",
-            "url": "http://localhost:3013/project/<project-id>/output/output.pdf"
-        }, {
-            "type": "log",
-            "url": "http://localhost:3013/project/<project-id>/output/output.log"
-        }]
-    }
+  "compile": {
+    "status": "success",
+    "outputFiles": [
+      {
+        "type": "pdf",
+        "url": "http://localhost:3013/project/<project-id>/output/output.pdf"
+      },
+      {
+        "type": "log",
+        "url": "http://localhost:3013/project/<project-id>/output/output.log"
+      }
+    ]
+  }
 }
 }
 ```
 ```
 
 
-License
--------
+## License
 
 
 The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
 The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
 
 

+ 1 - 1
services/clsi/app/js/LatexRunner.js

@@ -85,7 +85,7 @@ function runLatex(projectId, options, callback) {
       }
       }
       // number of latex runs and whether there were errors
       // number of latex runs and whether there were errors
       const runs =
       const runs =
-        output?.stderr?.match(/^Run number \d+ of .*latex/gm)?.length || 0
+        output?.stdout?.match(/^Run number \d+ of .*latex/gm)?.length || 0
       const failed = output?.stdout?.match(/^Latexmk: Errors/m) != null ? 1 : 0
       const failed = output?.stdout?.match(/^Latexmk: Errors/m) != null ? 1 : 0
       // counters from latexmk output
       // counters from latexmk output
       stats['latexmk-errors'] = failed
       stats['latexmk-errors'] = failed

+ 1 - 1
services/clsi/buildscript.txt

@@ -1,7 +1,7 @@
 clsi
 clsi
 --data-dirs=cache,compiles,output
 --data-dirs=cache,compiles,output
 --dependencies=
 --dependencies=
---env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true",ALLOWED_IMAGES=quay.io/sharelatex/texlive-full:2017.1,TEXLIVE_IMAGE=quay.io/sharelatex/texlive-full:2017.1,TEX_LIVE_IMAGE_NAME_OVERRIDE=us-east1-docker.pkg.dev/overleaf-ops/ol-docker,TEXLIVE_IMAGE_USER="tex",SANDBOXED_COMPILES="true",SANDBOXED_COMPILES_HOST_DIR_COMPILES=$PWD/compiles,SANDBOXED_COMPILES_HOST_DIR_OUTPUT=$PWD/output
+--env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true",ALLOWED_IMAGES=quay.io/sharelatex/texlive-full:2025.1,TEXLIVE_IMAGE=quay.io/sharelatex/texlive-full:2025.1,TEX_LIVE_IMAGE_NAME_OVERRIDE=us-east1-docker.pkg.dev/overleaf-ops/ol-docker,TEXLIVE_IMAGE_USER="tex",SANDBOXED_COMPILES="true",SANDBOXED_COMPILES_HOST_DIR_COMPILES=$PWD/compiles,SANDBOXED_COMPILES_HOST_DIR_OUTPUT=$PWD/output
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --node-version=22.18.0
 --node-version=22.18.0

+ 2 - 2
services/clsi/docker-compose.ci.yml

@@ -28,8 +28,8 @@ services:
       NODE_OPTIONS: "--unhandled-rejections=strict"
       NODE_OPTIONS: "--unhandled-rejections=strict"
       ENABLE_PDF_CACHING: "true"
       ENABLE_PDF_CACHING: "true"
       PDF_CACHING_ENABLE_WORKER_POOL: "true"
       PDF_CACHING_ENABLE_WORKER_POOL: "true"
-      ALLOWED_IMAGES: quay.io/sharelatex/texlive-full:2017.1
-      TEXLIVE_IMAGE: quay.io/sharelatex/texlive-full:2017.1
+      ALLOWED_IMAGES: quay.io/sharelatex/texlive-full:2025.1
+      TEXLIVE_IMAGE: quay.io/sharelatex/texlive-full:2025.1
       TEX_LIVE_IMAGE_NAME_OVERRIDE: us-east1-docker.pkg.dev/overleaf-ops/ol-docker
       TEX_LIVE_IMAGE_NAME_OVERRIDE: us-east1-docker.pkg.dev/overleaf-ops/ol-docker
       TEXLIVE_IMAGE_USER: "tex"
       TEXLIVE_IMAGE_USER: "tex"
       SANDBOXED_COMPILES: "true"
       SANDBOXED_COMPILES: "true"

+ 2 - 2
services/clsi/docker-compose.yml

@@ -42,8 +42,8 @@ services:
       NODE_OPTIONS: "--unhandled-rejections=strict"
       NODE_OPTIONS: "--unhandled-rejections=strict"
       ENABLE_PDF_CACHING: "true"
       ENABLE_PDF_CACHING: "true"
       PDF_CACHING_ENABLE_WORKER_POOL: "true"
       PDF_CACHING_ENABLE_WORKER_POOL: "true"
-      ALLOWED_IMAGES: quay.io/sharelatex/texlive-full:2017.1
-      TEXLIVE_IMAGE: quay.io/sharelatex/texlive-full:2017.1
+      ALLOWED_IMAGES: quay.io/sharelatex/texlive-full:2025.1
+      TEXLIVE_IMAGE: quay.io/sharelatex/texlive-full:2025.1
       TEX_LIVE_IMAGE_NAME_OVERRIDE: us-east1-docker.pkg.dev/overleaf-ops/ol-docker
       TEX_LIVE_IMAGE_NAME_OVERRIDE: us-east1-docker.pkg.dev/overleaf-ops/ol-docker
       TEXLIVE_IMAGE_USER: "tex"
       TEXLIVE_IMAGE_USER: "tex"
       SANDBOXED_COMPILES: "true"
       SANDBOXED_COMPILES: "true"

BIN
services/clsi/test/acceptance/fixtures/examples/asymptote/output.pdf


+ 64 - 79
services/clsi/test/acceptance/fixtures/examples/asymptote/output.pdfxref

@@ -1,81 +1,66 @@
-1/0: uncompressed; offset = 123103
-2/0: uncompressed; offset = 123422
+1/0: uncompressed; offset = 92043
+2/0: uncompressed; offset = 92293
 3/0: uncompressed; offset = 15
 3/0: uncompressed; offset = 15
 4/0: uncompressed; offset = 216
 4/0: uncompressed; offset = 216
-5/0: uncompressed; offset = 1084
-6/0: uncompressed; offset = 1244
-7/0: uncompressed; offset = 4001
-8/0: uncompressed; offset = 4155
-9/0: uncompressed; offset = 4297
-10/0: uncompressed; offset = 4933
-11/0: uncompressed; offset = 5309
-12/0: uncompressed; offset = 5498
-13/0: uncompressed; offset = 30250
-14/0: uncompressed; offset = 31471
-15/0: uncompressed; offset = 38404
-16/0: uncompressed; offset = 39046
-17/0: uncompressed; offset = 40166
-18/0: uncompressed; offset = 40906
-19/0: uncompressed; offset = 65560
-20/0: uncompressed; offset = 74702
-21/0: uncompressed; offset = 81705
-22/0: uncompressed; offset = 97182
-23/0: uncompressed; offset = 104117
-24/0: uncompressed; offset = 111195
-25/0: uncompressed; offset = 118571
-26/0: compressed; stream = 6, index = 0
-27/0: compressed; stream = 6, index = 1
-28/0: compressed; stream = 6, index = 2
-29/0: compressed; stream = 6, index = 3
-30/0: compressed; stream = 6, index = 4
-31/0: compressed; stream = 6, index = 5
-32/0: compressed; stream = 6, index = 6
-33/0: compressed; stream = 6, index = 7
-34/0: compressed; stream = 6, index = 8
-35/0: compressed; stream = 6, index = 9
-36/0: compressed; stream = 6, index = 10
-37/0: compressed; stream = 6, index = 11
-38/0: compressed; stream = 6, index = 12
-39/0: compressed; stream = 6, index = 13
-40/0: compressed; stream = 6, index = 14
-41/0: compressed; stream = 6, index = 15
-42/0: compressed; stream = 6, index = 16
-43/0: compressed; stream = 6, index = 17
-44/0: compressed; stream = 6, index = 18
-45/0: compressed; stream = 6, index = 19
-46/0: compressed; stream = 6, index = 20
-47/0: compressed; stream = 6, index = 21
-48/0: compressed; stream = 6, index = 22
-49/0: compressed; stream = 6, index = 23
-50/0: compressed; stream = 6, index = 24
-51/0: compressed; stream = 6, index = 25
-52/0: compressed; stream = 6, index = 26
-53/0: compressed; stream = 6, index = 27
-54/0: compressed; stream = 6, index = 28
-55/0: compressed; stream = 6, index = 29
-56/0: compressed; stream = 6, index = 30
-57/0: compressed; stream = 6, index = 31
-58/0: compressed; stream = 6, index = 32
-59/0: compressed; stream = 6, index = 33
-60/0: compressed; stream = 6, index = 34
-61/0: compressed; stream = 6, index = 35
-62/0: compressed; stream = 6, index = 36
-63/0: compressed; stream = 6, index = 37
-64/0: compressed; stream = 6, index = 38
-65/0: compressed; stream = 6, index = 39
-66/0: compressed; stream = 6, index = 40
-67/0: compressed; stream = 6, index = 41
-68/0: compressed; stream = 6, index = 42
-69/0: compressed; stream = 6, index = 43
-70/0: compressed; stream = 6, index = 44
-71/0: compressed; stream = 6, index = 45
-72/0: compressed; stream = 6, index = 46
-73/0: compressed; stream = 6, index = 47
-74/0: compressed; stream = 6, index = 48
-75/0: compressed; stream = 6, index = 49
-76/0: compressed; stream = 6, index = 50
-77/0: compressed; stream = 6, index = 51
-78/0: compressed; stream = 6, index = 52
-79/0: compressed; stream = 6, index = 53
-80/0: compressed; stream = 6, index = 54
-81/0: compressed; stream = 6, index = 55
+5/0: uncompressed; offset = 979
+6/0: uncompressed; offset = 1029
+7/0: uncompressed; offset = 1191
+8/0: uncompressed; offset = 1300
+9/0: uncompressed; offset = 1902
+10/0: uncompressed; offset = 2233
+11/0: uncompressed; offset = 2870
+12/0: uncompressed; offset = 3910
+13/0: uncompressed; offset = 4666
+14/0: uncompressed; offset = 5435
+15/0: uncompressed; offset = 6204
+16/0: uncompressed; offset = 7177
+17/0: uncompressed; offset = 28756
+18/0: uncompressed; offset = 37898
+19/0: uncompressed; offset = 44901
+20/0: uncompressed; offset = 60378
+21/0: uncompressed; offset = 67313
+22/0: uncompressed; offset = 74391
+23/0: uncompressed; offset = 81767
+24/0: uncompressed; offset = 86299
+25/0: uncompressed; offset = 87068
+26/0: uncompressed; offset = 87881
+27/0: uncompressed; offset = 88694
+28/0: uncompressed; offset = 89507
+29/0: uncompressed; offset = 90252
+30/0: compressed; stream = 29, index = 0
+31/0: compressed; stream = 29, index = 1
+32/0: compressed; stream = 29, index = 2
+33/0: compressed; stream = 29, index = 3
+34/0: compressed; stream = 29, index = 4
+35/0: compressed; stream = 29, index = 5
+36/0: compressed; stream = 29, index = 6
+37/0: compressed; stream = 29, index = 7
+38/0: compressed; stream = 29, index = 8
+39/0: compressed; stream = 29, index = 9
+40/0: compressed; stream = 29, index = 10
+41/0: compressed; stream = 29, index = 11
+42/0: compressed; stream = 29, index = 12
+43/0: compressed; stream = 29, index = 13
+44/0: compressed; stream = 29, index = 14
+45/0: compressed; stream = 29, index = 15
+46/0: compressed; stream = 29, index = 16
+47/0: compressed; stream = 29, index = 17
+48/0: compressed; stream = 29, index = 18
+49/0: compressed; stream = 29, index = 19
+50/0: compressed; stream = 29, index = 20
+51/0: compressed; stream = 29, index = 21
+52/0: compressed; stream = 29, index = 22
+53/0: compressed; stream = 29, index = 23
+54/0: compressed; stream = 29, index = 24
+55/0: compressed; stream = 29, index = 25
+56/0: compressed; stream = 29, index = 26
+57/0: compressed; stream = 29, index = 27
+58/0: compressed; stream = 29, index = 28
+59/0: compressed; stream = 29, index = 29
+60/0: compressed; stream = 29, index = 30
+61/0: compressed; stream = 29, index = 31
+62/0: compressed; stream = 29, index = 32
+63/0: compressed; stream = 29, index = 33
+64/0: compressed; stream = 29, index = 34
+65/0: compressed; stream = 29, index = 35
+66/0: compressed; stream = 29, index = 36

BIN
services/clsi/test/acceptance/fixtures/examples/feynmp/output.pdf


+ 15 - 15
services/clsi/test/acceptance/fixtures/examples/feynmp/output.pdfxref

@@ -1,20 +1,20 @@
-1/0: uncompressed; offset = 4964
-2/0: uncompressed; offset = 5023
-3/0: uncompressed; offset = 5234
+1/0: uncompressed; offset = 4966
+2/0: uncompressed; offset = 5025
+3/0: uncompressed; offset = 5259
 4/0: uncompressed; offset = 15
 4/0: uncompressed; offset = 15
 5/0: uncompressed; offset = 734
 5/0: uncompressed; offset = 734
 6/0: uncompressed; offset = 799
 6/0: uncompressed; offset = 799
 7/0: uncompressed; offset = 933
 7/0: uncompressed; offset = 933
 8/0: uncompressed; offset = 1104
 8/0: uncompressed; offset = 1104
-9/0: uncompressed; offset = 1947
-10/0: uncompressed; offset = 1992
-11/0: uncompressed; offset = 2182
-12/0: uncompressed; offset = 2427
-13/0: uncompressed; offset = 2597
-14/0: uncompressed; offset = 2822
-15/0: uncompressed; offset = 2989
-16/0: uncompressed; offset = 3239
-17/0: uncompressed; offset = 3271
-18/0: uncompressed; offset = 3328
-19/0: uncompressed; offset = 3740
-20/0: uncompressed; offset = 4270
+9/0: uncompressed; offset = 1946
+10/0: uncompressed; offset = 1994
+11/0: uncompressed; offset = 2184
+12/0: uncompressed; offset = 2429
+13/0: uncompressed; offset = 2599
+14/0: uncompressed; offset = 2824
+15/0: uncompressed; offset = 2991
+16/0: uncompressed; offset = 3241
+17/0: uncompressed; offset = 3273
+18/0: uncompressed; offset = 3330
+19/0: uncompressed; offset = 3742
+20/0: uncompressed; offset = 4272

BIN
services/clsi/test/acceptance/fixtures/examples/latex_compiler/output.dvi


BIN
services/clsi/test/acceptance/fixtures/examples/latex_compiler/output.pdf


+ 20 - 20
services/clsi/test/acceptance/fixtures/examples/latex_compiler/output.pdfxref

@@ -1,26 +1,26 @@
-1/0: uncompressed; offset = 25097
-2/0: uncompressed; offset = 25156
-3/0: uncompressed; offset = 25367
+1/0: uncompressed; offset = 25082
+2/0: uncompressed; offset = 25141
+3/0: uncompressed; offset = 25375
 4/0: uncompressed; offset = 15
 4/0: uncompressed; offset = 15
 5/0: uncompressed; offset = 854
 5/0: uncompressed; offset = 854
 6/0: uncompressed; offset = 919
 6/0: uncompressed; offset = 919
 7/0: uncompressed; offset = 1074
 7/0: uncompressed; offset = 1074
 8/0: uncompressed; offset = 1245
 8/0: uncompressed; offset = 1245
 9/0: uncompressed; offset = 18343
 9/0: uncompressed; offset = 18343
-10/0: uncompressed; offset = 18388
-11/0: uncompressed; offset = 18752
-12/0: uncompressed; offset = 19071
-13/0: uncompressed; offset = 19360
-14/0: uncompressed; offset = 19604
-15/0: uncompressed; offset = 19770
-16/0: uncompressed; offset = 20007
-17/0: uncompressed; offset = 20174
-18/0: uncompressed; offset = 20424
-19/0: uncompressed; offset = 20456
-20/0: uncompressed; offset = 20525
-21/0: uncompressed; offset = 23109
-22/0: uncompressed; offset = 23500
-23/0: uncompressed; offset = 24229
-24/0: uncompressed; offset = 24641
-25/0: uncompressed; offset = 24741
-26/0: uncompressed; offset = 24985
+10/0: uncompressed; offset = 18391
+11/0: uncompressed; offset = 18755
+12/0: uncompressed; offset = 19074
+13/0: uncompressed; offset = 19363
+14/0: uncompressed; offset = 19607
+15/0: uncompressed; offset = 19773
+16/0: uncompressed; offset = 20010
+17/0: uncompressed; offset = 20177
+18/0: uncompressed; offset = 20427
+19/0: uncompressed; offset = 20459
+20/0: uncompressed; offset = 20528
+21/0: uncompressed; offset = 20919
+22/0: uncompressed; offset = 21648
+23/0: uncompressed; offset = 22060
+24/0: uncompressed; offset = 24626
+25/0: uncompressed; offset = 24726
+26/0: uncompressed; offset = 24970

BIN
services/clsi/test/acceptance/fixtures/examples/minted/output.pdf


+ 19 - 17
services/clsi/test/acceptance/fixtures/examples/minted/output.pdfxref

@@ -1,19 +1,21 @@
-1/0: uncompressed; offset = 20679
-2/0: uncompressed; offset = 20927
+1/0: uncompressed; offset = 22291
+2/0: uncompressed; offset = 22541
 3/0: uncompressed; offset = 15
 3/0: uncompressed; offset = 15
 4/0: uncompressed; offset = 216
 4/0: uncompressed; offset = 216
-5/0: uncompressed; offset = 650
-6/0: uncompressed; offset = 700
-7/0: uncompressed; offset = 826
-8/0: uncompressed; offset = 934
-9/0: uncompressed; offset = 1252
-10/0: uncompressed; offset = 8248
-11/0: uncompressed; offset = 20115
-12/0: compressed; stream = 11, index = 0
-13/0: compressed; stream = 11, index = 1
-14/0: compressed; stream = 11, index = 2
-15/0: compressed; stream = 11, index = 3
-16/0: compressed; stream = 11, index = 4
-17/0: compressed; stream = 11, index = 5
-18/0: compressed; stream = 11, index = 6
-19/0: compressed; stream = 11, index = 7
+5/0: uncompressed; offset = 664
+6/0: uncompressed; offset = 714
+7/0: uncompressed; offset = 844
+8/0: uncompressed; offset = 952
+9/0: uncompressed; offset = 1294
+10/0: uncompressed; offset = 8288
+11/0: uncompressed; offset = 20150
+12/0: uncompressed; offset = 20963
+13/0: uncompressed; offset = 21708
+14/0: compressed; stream = 13, index = 0
+15/0: compressed; stream = 13, index = 1
+16/0: compressed; stream = 13, index = 2
+17/0: compressed; stream = 13, index = 3
+18/0: compressed; stream = 13, index = 4
+19/0: compressed; stream = 13, index = 5
+20/0: compressed; stream = 13, index = 6
+21/0: compressed; stream = 13, index = 7

+ 2 - 2
services/clsi/test/acceptance/js/SimpleLatexFileTests.js

@@ -73,8 +73,8 @@ Hello world
           'latexmk-errors',
           'latexmk-errors',
           'latex-runs',
           'latex-runs',
           'latex-runs-with-errors',
           'latex-runs-with-errors',
-          'latex-runs-2',
-          'latex-runs-with-errors-2',
+          'latex-runs-1',
+          'latex-runs-with-errors-1',
           'pdf-caching-total-ranges-size',
           'pdf-caching-total-ranges-size',
           'pdf-caching-reclaimed-space',
           'pdf-caching-reclaimed-space',
           'pdf-caching-new-ranges-size',
           'pdf-caching-new-ranges-size',

+ 33 - 269
services/clsi/test/unit/js/snapshots/pdfjs/asymptote/XrefTable.json

@@ -1,359 +1,123 @@
 {
 {
   "xRefEntries": [
   "xRefEntries": [
     {
     {
-      "offset": 0,
-      "gen": 0,
-      "free": true
+      "offset": 0
     },
     },
     {
     {
-      "offset": 123103,
-      "gen": 0,
+      "offset": 92043,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 123422,
-      "gen": 0,
+      "offset": 92293,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 15,
       "offset": 15,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 216,
       "offset": 216,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 1084,
-      "gen": 0,
+      "offset": 979,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 1244,
-      "gen": 0,
+      "offset": 1029,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 4001,
-      "gen": 0,
+      "offset": 1191,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 4155,
-      "gen": 0,
+      "offset": 1300,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 4297,
-      "gen": 0,
+      "offset": 1902,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 4933,
-      "gen": 0,
+      "offset": 2233,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 5309,
-      "gen": 0,
+      "offset": 2870,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 5498,
-      "gen": 0,
+      "offset": 3910,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 30250,
-      "gen": 0,
+      "offset": 4666,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 31471,
-      "gen": 0,
+      "offset": 5435,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 38404,
-      "gen": 0,
+      "offset": 6204,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 39046,
-      "gen": 0,
+      "offset": 7177,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 40166,
-      "gen": 0,
+      "offset": 28756,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 40906,
-      "gen": 0,
+      "offset": 37898,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 65560,
-      "gen": 0,
+      "offset": 44901,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 74702,
-      "gen": 0,
+      "offset": 60378,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 81705,
-      "gen": 0,
+      "offset": 67313,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 97182,
-      "gen": 0,
+      "offset": 74391,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 104117,
-      "gen": 0,
+      "offset": 81767,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 111195,
-      "gen": 0,
+      "offset": 86299,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 118571,
-      "gen": 0,
+      "offset": 87068,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 6,
-      "gen": 0
-    },
-    {
-      "offset": 6,
-      "gen": 1
-    },
-    {
-      "offset": 6,
-      "gen": 2
-    },
-    {
-      "offset": 6,
-      "gen": 3
-    },
-    {
-      "offset": 6,
-      "gen": 4
-    },
-    {
-      "offset": 6,
-      "gen": 5
-    },
-    {
-      "offset": 6,
-      "gen": 6
-    },
-    {
-      "offset": 6,
-      "gen": 7
-    },
-    {
-      "offset": 6,
-      "gen": 8
-    },
-    {
-      "offset": 6,
-      "gen": 9
-    },
-    {
-      "offset": 6,
-      "gen": 10
-    },
-    {
-      "offset": 6,
-      "gen": 11
-    },
-    {
-      "offset": 6,
-      "gen": 12
-    },
-    {
-      "offset": 6,
-      "gen": 13
-    },
-    {
-      "offset": 6,
-      "gen": 14
-    },
-    {
-      "offset": 6,
-      "gen": 15
-    },
-    {
-      "offset": 6,
-      "gen": 16
-    },
-    {
-      "offset": 6,
-      "gen": 17
-    },
-    {
-      "offset": 6,
-      "gen": 18
-    },
-    {
-      "offset": 6,
-      "gen": 19
-    },
-    {
-      "offset": 6,
-      "gen": 20
-    },
-    {
-      "offset": 6,
-      "gen": 21
-    },
-    {
-      "offset": 6,
-      "gen": 22
-    },
-    {
-      "offset": 6,
-      "gen": 23
-    },
-    {
-      "offset": 6,
-      "gen": 24
-    },
-    {
-      "offset": 6,
-      "gen": 25
-    },
-    {
-      "offset": 6,
-      "gen": 26
-    },
-    {
-      "offset": 6,
-      "gen": 27
-    },
-    {
-      "offset": 6,
-      "gen": 28
-    },
-    {
-      "offset": 6,
-      "gen": 29
-    },
-    {
-      "offset": 6,
-      "gen": 30
-    },
-    {
-      "offset": 6,
-      "gen": 31
-    },
-    {
-      "offset": 6,
-      "gen": 32
-    },
-    {
-      "offset": 6,
-      "gen": 33
-    },
-    {
-      "offset": 6,
-      "gen": 34
-    },
-    {
-      "offset": 6,
-      "gen": 35
-    },
-    {
-      "offset": 6,
-      "gen": 36
-    },
-    {
-      "offset": 6,
-      "gen": 37
-    },
-    {
-      "offset": 6,
-      "gen": 38
-    },
-    {
-      "offset": 6,
-      "gen": 39
-    },
-    {
-      "offset": 6,
-      "gen": 40
-    },
-    {
-      "offset": 6,
-      "gen": 41
-    },
-    {
-      "offset": 6,
-      "gen": 42
-    },
-    {
-      "offset": 6,
-      "gen": 43
-    },
-    {
-      "offset": 6,
-      "gen": 44
-    },
-    {
-      "offset": 6,
-      "gen": 45
-    },
-    {
-      "offset": 6,
-      "gen": 46
-    },
-    {
-      "offset": 6,
-      "gen": 47
-    },
-    {
-      "offset": 6,
-      "gen": 48
-    },
-    {
-      "offset": 6,
-      "gen": 49
-    },
-    {
-      "offset": 6,
-      "gen": 50
-    },
-    {
-      "offset": 6,
-      "gen": 51
-    },
-    {
-      "offset": 6,
-      "gen": 52
+      "offset": 87881,
+      "uncompressed": true
     },
     },
     {
     {
-      "offset": 6,
-      "gen": 53
+      "offset": 88694,
+      "uncompressed": true
     },
     },
     {
     {
-      "offset": 6,
-      "gen": 54
+      "offset": 89507,
+      "uncompressed": true
     },
     },
     {
     {
-      "offset": 6,
-      "gen": 55
+      "offset": 90252,
+      "uncompressed": true
     }
     }
-  ],
-  "startXRefTable": 123422
+  ]
 }
 }

+ 17 - 40
services/clsi/test/unit/js/snapshots/pdfjs/feynmp/XrefTable.json

@@ -1,110 +1,87 @@
 {
 {
   "xRefEntries": [
   "xRefEntries": [
     {
     {
-      "offset": 0,
-      "gen": 65535,
-      "free": true
+      "offset": 0
     },
     },
     {
     {
-      "offset": 4964,
-      "gen": 0,
+      "offset": 4966,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 5023,
-      "gen": 0,
+      "offset": 5025,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 5234,
-      "gen": 0,
+      "offset": 5259,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 15,
       "offset": 15,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 734,
       "offset": 734,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 799,
       "offset": 799,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 933,
       "offset": 933,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 1104,
       "offset": 1104,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 1947,
-      "gen": 0,
+      "offset": 1946,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 1992,
-      "gen": 0,
+      "offset": 1994,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 2182,
-      "gen": 0,
+      "offset": 2184,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 2427,
-      "gen": 0,
+      "offset": 2429,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 2597,
-      "gen": 0,
+      "offset": 2599,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 2822,
-      "gen": 0,
+      "offset": 2824,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 2989,
-      "gen": 0,
+      "offset": 2991,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 3239,
-      "gen": 0,
+      "offset": 3241,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 3271,
-      "gen": 0,
+      "offset": 3273,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 3328,
-      "gen": 0,
+      "offset": 3330,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 3740,
-      "gen": 0,
+      "offset": 3742,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 4270,
-      "gen": 0,
+      "offset": 4272,
       "uncompressed": true
       "uncompressed": true
     }
     }
-  ],
-  "startXRefTable": 6682
+  ]
 }
 }

+ 22 - 51
services/clsi/test/unit/js/snapshots/pdfjs/latex_compiler/XrefTable.json

@@ -1,140 +1,111 @@
 {
 {
   "xRefEntries": [
   "xRefEntries": [
     {
     {
-      "offset": 0,
-      "gen": 65535,
-      "free": true
+      "offset": 0
     },
     },
     {
     {
-      "offset": 25097,
-      "gen": 0,
+      "offset": 25082,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 25156,
-      "gen": 0,
+      "offset": 25141,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 25367,
-      "gen": 0,
+      "offset": 25375,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 15,
       "offset": 15,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 854,
       "offset": 854,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 919,
       "offset": 919,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 1074,
       "offset": 1074,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 1245,
       "offset": 1245,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 18343,
       "offset": 18343,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 18388,
-      "gen": 0,
+      "offset": 18391,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 18752,
-      "gen": 0,
+      "offset": 18755,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 19071,
-      "gen": 0,
+      "offset": 19074,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 19360,
-      "gen": 0,
+      "offset": 19363,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 19604,
-      "gen": 0,
+      "offset": 19607,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 19770,
-      "gen": 0,
+      "offset": 19773,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 20007,
-      "gen": 0,
+      "offset": 20010,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 20174,
-      "gen": 0,
+      "offset": 20177,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 20424,
-      "gen": 0,
+      "offset": 20427,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 20456,
-      "gen": 0,
+      "offset": 20459,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 20525,
-      "gen": 0,
+      "offset": 20528,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 23109,
-      "gen": 0,
+      "offset": 20919,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 23500,
-      "gen": 0,
+      "offset": 21648,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 24229,
-      "gen": 0,
+      "offset": 22060,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 24641,
-      "gen": 0,
+      "offset": 24626,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 24741,
-      "gen": 0,
+      "offset": 24726,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 24985,
-      "gen": 0,
+      "offset": 24970,
       "uncompressed": true
       "uncompressed": true
     }
     }
-  ],
-  "startXRefTable": 26815
+  ]
 }
 }

+ 15 - 53
services/clsi/test/unit/js/snapshots/pdfjs/minted/XrefTable.json

@@ -1,97 +1,59 @@
 {
 {
   "xRefEntries": [
   "xRefEntries": [
     {
     {
-      "offset": 0,
-      "gen": 0,
-      "free": true
+      "offset": 0
     },
     },
     {
     {
-      "offset": 20679,
-      "gen": 0,
+      "offset": 22291,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 20927,
-      "gen": 0,
+      "offset": 22541,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 15,
       "offset": 15,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
       "offset": 216,
       "offset": 216,
-      "gen": 0,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 650,
-      "gen": 0,
+      "offset": 664,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 700,
-      "gen": 0,
+      "offset": 714,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 826,
-      "gen": 0,
+      "offset": 844,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 934,
-      "gen": 0,
+      "offset": 952,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 1252,
-      "gen": 0,
+      "offset": 1294,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 8248,
-      "gen": 0,
+      "offset": 8288,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 20115,
-      "gen": 0,
+      "offset": 20150,
       "uncompressed": true
       "uncompressed": true
     },
     },
     {
     {
-      "offset": 11,
-      "gen": 0
-    },
-    {
-      "offset": 11,
-      "gen": 1
-    },
-    {
-      "offset": 11,
-      "gen": 2
-    },
-    {
-      "offset": 11,
-      "gen": 3
-    },
-    {
-      "offset": 11,
-      "gen": 4
-    },
-    {
-      "offset": 11,
-      "gen": 5
-    },
-    {
-      "offset": 11,
-      "gen": 6
+      "offset": 20963,
+      "uncompressed": true
     },
     },
     {
     {
-      "offset": 11,
-      "gen": 7
+      "offset": 21708,
+      "uncompressed": true
     }
     }
-  ],
-  "startXRefTable": 20927
+  ]
 }
 }