nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: compiler-explorer/compiler-explorer
Pull request #7344 (2025-01-30 18:59:29)

Parse Rust error message locations with multiple leading spaces
Rust error message locations (` --> <source>:<line>:<col>`) can have more than one leading space, e. g. when the source code snippet that is shown has line numbers greater than ten.

In this example (https://godbolt.org/z/9W8xPv36c), the error message is not be recognised as an error and there are no red squigglies in the editor pane.


Patch:
diff --git a/lib/utils.ts b/lib/utils.ts
index 49910ed49..2b561c599 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -233,7 +233,7 @@ export function parseOutput(
 }
 
 export function parseRustOutput(lines: string, inputFilename?: string, pathPrefix?: string) {
-    const re = /^ --> <source>[(:](\d+)(:?,?(\d+):?)?[):]*\s*(.*)/;
+    const re = /^\s+-->\s+<source>[(:](\d+)(:?,?(\d+):?)?[):]*\s*(.*)/;
     const result: ResultLine[] = [];
     eachLine(lines, line => {
         line = _parseOutputLine(line, inputFilename, pathPrefix);


Test patch:
diff --git a/test/utils-tests.ts b/test/utils-tests.ts
index 2ecdeb836..93156fd2d 100644
--- a/test/utils-tests.ts
+++ b/test/utils-tests.ts
@@ -268,6 +268,16 @@ describe('Rust compiler output', () => {
                 text: ' --> <source>:1:5',
             },
         ]);
+        expect(utils.parseRustOutput('Multiple spaces\n   --> bob.rs:1:5', 'bob.rs')).toEqual([
+            {
+                tag: {column: 5, line: 1, text: 'Multiple spaces', severity: 3},
+                text: 'Multiple spaces',
+            },
+            {
+                tag: {column: 5, line: 1, text: '', severity: 3},
+                text: '   --> <source>:1:5',
+            },
+        ]);
     });
 
     it('replaces all references to input source', () => {
Repository: compiler-explorer/compiler-explorer
Pull request #7356 (2025-02-02 18:39:45)

Deduplicate npm scripts used for CI
There's nothing special with these anymore. They are the same both locally and in CI now, because our Vitest and Biome setups don't behave differently there



Patch:
diff --git a/package.json b/package.json
index a31e2694f..6eeb3ea80 100644
--- a/package.json
+++ b/package.json
@@ -144,8 +144,6 @@
     "@rollup/rollup-win32-x64-msvc": "*"
   },
   "scripts": {
-    "ci-test": "vitest run",
-    "ci-lint": "biome check .",
     "cypress": "cypress run",
     "lint": "biome check . --write",
     "lint-check": "biome check .",


Test patch:
diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml
index 620d1bbb2..1da1b0f6b 100644
--- a/.github/workflows/test-and-deploy.yml
+++ b/.github/workflows/test-and-deploy.yml
@@ -22,7 +22,7 @@ jobs:
       - name: Run checks
         run: |
           npm run lint-check
-          npm run ci-test
+          npm run test
           npm run ts-check
           python3 ./etc/scripts/util/propscheck.py
       - uses: codecov/codecov-action@v4
diff --git a/.github/workflows/test-win.yml b/.github/workflows/test-win.yml
index fe016aa59..c1330e75f 100644
--- a/.github/workflows/test-win.yml
+++ b/.github/workflows/test-win.yml
@@ -29,5 +29,5 @@ jobs:
         run: npm run ts-check
         shell: cmd
       - name: Test
-        run: npm run ci-test
+        run: npm run test
         shell: cmd