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 129f318
Browse filesBrowse the repository at this point in the historyBrowse files
self.err("WRITE_TO_NON_SOURCE","O-4",format!("context {} is read beneath its provision: call an action it provides that writes it (O-4)", target.name));
2353
+
self.err("WRITE_TO_NON_SOURCE","O-4",format!("context {} is read beneath its provision: call an action it provides that writes it", target.name));
2354
2354
}
2355
2355
}
2356
2356
}else{
@@ -2374,7 +2374,7 @@ impl<'a> Checker<'a> {
2374
2374
k => format!("a {}", k.as_str()),
2375
2375
};
2376
2376
let hint = if k == SymKind::Props || k == SymKind::Value || self.syms[t].param{" — a source is written only in the region that declares it: have its owner pass an action that writes it (O-4)"}else{""};
2377
-
self.err("WRITE_TO_NON_SOURCE","W-1",format!("{} is {}: only sources are written (W-1){}", target.name, what, hint));
2377
+
self.err("WRITE_TO_NON_SOURCE","W-1",format!("{} is {}: only sources are written{}", target.name, what, hint));
privatehandlers: {attrs: {name: string;e: Expr}[];kids: Markup[];h: Expr;env: Env;region: Region;line: number;what: string}[]=[];// AC-3a: element handlers, by where they are
this.err("GUESS_WHILE_LOADING","AC-3a",`${hr.what}${b.via ? `starts \`${b.via}\`, which can run` : "can run"} \`guess ${tn}\` while ${tn} is loading a new question (its question reads what the click reads): the guess composes on the previous answer, and the new answer replaces it, so the change disappears while it is out (D-34) — put the element inside the \`loading\` region whose content reads ${tn}, or give it \`disabled={pending? ${tn}}\`, or keep the pending change in a source of its own until it lands`);
359
+
}
360
+
}
361
+
st.push(...kidsOf(n));
362
+
}
363
+
}
364
+
}
258
365
}
259
366
260
367
// ---- CN-3e: an outside read holds a `loading on(…)` region's change ----
@@ -835,14 +942,14 @@ class Checker {
835
942
lettarget: Sym|undefined;
836
943
if(s.target.ctx){
837
944
constc=this.ctxOf(s.target.name,env);
838
-
if(c){this.model.write(c,s.k,s.target.path.length>0);this.uses.push({region: env.region,name: c.ctx!.key,line: this.line,display: s.target.name});if(!c.ctx!.source)this.err("WRITE_TO_NON_SOURCE","O-4",`context ${s.target.name} is read beneath its provision: call an action it provides that writes it (O-4)`);}
945
+
if(c){this.model.write(c,s.k,s.target.path.length>0);this.uses.push({region: env.region,name: c.ctx!.key,line: this.line,display: s.target.name});if(!c.ctx!.source)this.err("WRITE_TO_NON_SOURCE","O-4",`context ${s.target.name} is read beneath its provision: call an action it provides that writes it`);}
constguessable=s.k==="optimistic"&&target?.kind==="eq"&&!!target.eqDecl&&!target.param&&!target.imported;// AC-3: a guess may sit over an equation (Solid's createOptimistic(fn)); it is not a write of the truth
843
950
if(guessable&&target!.eqDecl!.deferred)this.err("GUESS_ON_DEFERRED","AC-3",`${s.target.name} is deferred: its value is a lagging copy (V-16), so nothing would confirm a guess on it — guess the equation it lags`);
844
951
elseif(guessable){}
845
-
elseif(target&&target.kind!=="source")this.err("WRITE_TO_NON_SOURCE","W-1",`${s.target.name} is ${target.kind==="eq" ? "an equation" : target.kind==="props" ? "props" : `a ${target.kind}`}: only sources are written (W-1)${target.kind==="props"||target.kind==="value"||target.param ? " — a source is written only in the region that declares it: have its owner pass an action that writes it (O-4)" : ""}`);
952
+
elseif(target&&target.kind!=="source")this.err("WRITE_TO_NON_SOURCE","W-1",`${s.target.name} is ${target.kind==="eq" ? "an equation" : target.kind==="props" ? "props" : `a ${target.kind}`}: only sources are written${target.kind==="props"||target.kind==="value"||target.param ? " — a source is written only in the region that declares it: have its owner pass an action that writes it (O-4)" : ""}`);
846
953
elseif(target?.imported)this.err("WRITE_TO_NON_SOURCE","MO-2",`${s.target.name} is a source of ${target.imported}: a module boundary is a value boundary — write it through an action ${target.imported} exports`);
0 commit comments