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
lsp: read the compiled assembly's name from Fsc's -o: rather than deriving it from MSBuild properties #1007
The friend-assembly grading (borzoi_sema::Friendship) reads each reference's InternalsVisibleTo against the name FCS gives the project being checked: the name of the file the Fsc task's -o: names, up to its last dot. The LSP derives it from evaluated MSBuild values (borzoi::workspace::assembly_name_of) and certifies it only inside a narrow domain: trusted $(TargetName), $(TargetExt) of .dll or .exe, no document outside the SDK replacing CoreCompile, the Fsc task or the IntermediateAssembly item or writing those properties at build time, and a trusted $(OtherFlags) with no output switch. Everything else is ConsumerName::Unknown.
Unknown is expensive: every reference with any friend declaration then grades as a possible friend, and the reference pack's System.Runtime.CompilerServices.VisualC.dll declares one (mscorlib), so the project's whole assembly surface declines.
Each widening of that domain was found by review (an overridden IntermediateAssembly, --out: in OtherFlags, quotes inside it, a replaced CoreCompile). The structural answer is to stop re-deriving the name and read it from the compiler's arguments, as the memory note "read fsc's arguments, don't re-derive" says for other compiler inputs: build through CoreCompile with SkipCompilerExecution and read FscCommandLineArgs' -o: (last one wins), or hold the derivation to that oracle with a generated differential over the spellings above.
Until then the domain errs to Unknown, which is sound and dark.
Direction decided: the compiled assembly name stays a static derivation, certified over a positive domain rather than by listing routes to subtract. Two codex rounds on fsc-name-derivation-wip found a new output-switch injection each time, so subtraction doesn't converge.
The domain: commit to a name only when every property, item type, item metadata name, environment variable and global defined outside the .NET install is on an allow-list. Each allowed name is graded by the fscArgs oracle (branch fsc-args-op) by perturbing it with line-break and option-shaped values; it must not move -o:, or its value must be checked.
This needs the evaluator to expose item metadata names written outside the SDK, and whether the evaluation is a multi-target outer build or an inner one. Package build files such as Nerdbank.GitVersioning's would need allow-listing by content hash once graded; until then those projects stay Unknown, which is sound.
The user has accepted a documented assumption about the build environment. MSBuild reads every environment variable as a property, and the LSP cannot see the environment builds run in.
The derivation therefore declines when the LSP's own environment holds a variable named like a property that any SDK file reads (a static scan per installed SDK), or one that an SDK task or tool reads. Every other variable is inert by construction, and a perturbation sweep over unlisted names grades that.
The assumption, stated like the existing Configuration=Debug guess, is that the build environment adds no variable named like an SDK-read property beyond what the LSP sees.
Activity
Smaug123 commentedon Nov 18, 2026
Direction decided: the compiled assembly name stays a static derivation, certified over a positive domain rather than by listing routes to subtract. Two codex rounds on
fsc-name-derivation-wipfound a new output-switch injection each time, so subtraction doesn't converge.The domain: commit to a name only when every property, item type, item metadata name, environment variable and global defined outside the .NET install is on an allow-list. Each allowed name is graded by the
fscArgsoracle (branchfsc-args-op) by perturbing it with line-break and option-shaped values; it must not move-o:, or its value must be checked.This needs the evaluator to expose item metadata names written outside the SDK, and whether the evaluation is a multi-target outer build or an inner one. Package build files such as Nerdbank.GitVersioning's would need allow-listing by content hash once graded; until then those projects stay
Unknown, which is sound.The LSP does not run design-time builds for this.
Smaug123 commentedon Nov 18, 2026
The user has accepted a documented assumption about the build environment. MSBuild reads every environment variable as a property, and the LSP cannot see the environment builds run in.
The derivation therefore declines when the LSP's own environment holds a variable named like a property that any SDK file reads (a static scan per installed SDK), or one that an SDK task or tool reads. Every other variable is inert by construction, and a perturbation sweep over unlisted names grades that.
The assumption, stated like the existing
Configuration=Debugguess, is that the build environment adds no variable named like an SDK-read property beyond what the LSP sees.fsc_args oracle and the compiled assembly name, held certain-implies-…
fsc_args oracle and the compiled assembly name, held certain-implies-…