mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-11-30 10:34:32 -06:00
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:
co-authored by
Claude Opus 5
parent
1d76a08711
commit
b7cb161791
@@ -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) {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user