diff --git a/lib/base-compiler.ts b/lib/base-compiler.ts index ab1cffc73..683ba5f34 100644 --- a/lib/base-compiler.ts +++ b/lib/base-compiler.ts @@ -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) { diff --git a/test/utils-tests.ts b/test/utils-tests.ts index a984e278b..4988e7c29 100644 --- a/test/utils-tests.ts +++ b/test/utils-tests.ts @@ -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', () => {