You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2a76758
Browse filesBrowse the repository at this point in the historyBrowse files
problem(where,`${label}: an exception must name the card that will move the member, as \`#<number>\`; got ${JSON.stringify(row.card)}. An exception nobody owns is a permanent hole.`);
if(!entry)returnproblem(where,`${label}: \`${row.class}\` is not a registered facade class of ${row.file} (registered: ${ofFile.map((e)=>`\`${e.row.class}\``).join(', ')})`);
743
+
}elseif(ofFile.length>1){
744
+
returnproblem(where,`${label}: ${row.file} registers ${ofFile.length} facade classes (${ofFile.map((e)=>`\`${e.row.class}\``).join(', ')}), so the row must name its \`class\``);
@@ -738,7 +761,7 @@ export function checkRegistry(registry, readFile) {
738
761
returnproblem(where,`${label}: the member is already a ${member.verdict==='field' ? 'field' : 'delegation'} — its card ${row.card} has moved it. Delete the row; the member must stay a delegation.`);
console.log(`✓ check-facade-delegation-only: ${facades.length} facade file(s) hold delegations only, ${excepted.length} named exception(s).`);
1160
+
constfiles=newSet(facades.map((f)=>f.file)).size;
1161
+
console.log(`✓ check-facade-delegation-only: ${facades.length} facade class(es) in ${files} file(s) hold delegations only, ${excepted.length} named exception(s).`);
check('a method that only shares a hand-series import\'s name is not a hand-series stub',why('ObjectRepository','count')==='',why('ObjectRepository','count'));
3205
+
check('a body writing a private member of another instance stays (foreign-private)',why('ScopedContext','derive').startsWith('foreign-private'),why('ScopedContext','derive'));
3206
+
check('a body handing the instance on stays (bare-this)',why('ScopedContext','handsSelf').startsWith('bare-this'),why('ScopedContext','handsSelf'));
3207
+
check('a public method with an inferred return type stays (inferred-return-type)',why('ObjectRepository','inferred').startsWith('inferred-return-type'),why('ObjectRepository','inferred'));
check('the host module keeps one InstanceHost per class and imports types only',
3222
+
hostsMod.includes("export const scopedContextHost = new InstanceHost<ScopedContext, ScopedContextHost>('ScopedContextFacet', 'ScopedContext');")&&
3223
+
!/^import(?!type)/m.test(hostsMod));
3224
+
check('a private docblock moves with its body; a public one stays on the class',
3225
+
ctxMod.includes(' /** A private docblock: it moves with the body. */\n static readFlag(')&&!out.host.includes('A private docblock')&&
3226
+
out.host.includes(' /** A public docblock: it stays on the class. */\n find(query: any = {}): Promise<any[]> {'));
3227
+
check('a field a body assigns gets a setter in its class\'s install block',
3228
+
out.host.includes(' get flag() { return instance.flag; },\n set flag(v) { instance.flag = v; },'));
3229
+
check('the first pass\'s class is not touched',out.host.includes(` run(n: number): number {\n // ${MARK} The body moved to \`engine-lifecycle.ts\`.\n return LifecycleFacet.run(n);\n }`)&&
3230
+
!out.host.slice(out.host.indexOf('export class ObjectQL'),out.host.indexOf('export class ObjectRepository')).includes(SCOPED_MARK));
check('a stub handing the other class\'s host fails',verifyWith(out.host.replace('ScopedContextFacet.sudo.call(scopedContextHost.of(this))','ScopedContextFacet.sudo.call(objectRepositoryHost.of(this))'),out.modules));
3235
+
check('a written field\'s setter left out of the install block fails',verifyWith(out.host.replace(' set flag(v) { instance.flag = v; },\n',''),out.modules));
check('an import only a moved body read is pruned, and the proof names it',out.pruned.includes('onlyScopedReads')&&v.pruned.includes('onlyScopedReads'),out.pruned.join());
3238
+
check('a scoped class the file does not declare refuses',
0 commit comments