Drop the needless comment and test

Cleaning a result before caching it needs no explanation, and the
idempotency test only existed to justify the second call site that has
now gone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mattgodbolt-molty
2026-08-24 21:52:36 -05:00
co-authored by Claude Opus 5
parent 1d76a08711
commit b7cb161791
2 changed files with 0 additions and 11 deletions
-2
View File
@@ -3635,8 +3635,6 @@ export class BaseCompiler {
];
}
// Mask before caching, not after: whatever we store here is served verbatim on a
// cache hit, which never gets a chance to clean it up.
this.cleanupResult(result);
if (result.okToCache && !delayCaching) {
-9
View File
@@ -801,15 +801,6 @@ describe('maskRootdirKeepingAppPrefix', () => {
it('leaves non-temp paths untouched', () => {
expect(utils.maskRootdirKeepingAppPrefix('/usr/include/stdio.h')).toEqual('/usr/include/stdio.h');
});
it('is idempotent, so masking an already-masked path is a no-op', () => {
// Load-bearing for base-compiler's cache-hit path, which masks results that may
// already have been masked before being cached.
const once = utils.maskRootdirKeepingAppPrefix('/tmp/compiler-explorer-compiler123-4-abc/example.cpp');
expect(utils.maskRootdirKeepingAppPrefix(once)).toEqual(once);
const embedded = utils.maskRootdirKeepingAppPrefix('-I/tmp/compiler-explorer-compiler123-4-abc/include');
expect(utils.maskRootdirKeepingAppPrefix(embedded)).toEqual(embedded);
});
});
describe('maskRootdir', () => {