Skip to content

Commit ac09982

Browse files
committed
Add note on proper long-term fix for extension method collision
1 parent f829dd3 commit ac09982

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/AI.CodeAnalysis/ChatClientExtensionsGenerator.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
2323
context.RegisterSourceOutput(provider,
2424
(spc, source) =>
2525
{
26+
// TODO: the condition should actually be: ALWAYS ensure our extension method
27+
// is accessible in the current compilation. If it's via a project reference and
28+
// internals visible to, don't emit the source code, but if it's not available,
29+
// we need to emit it. Since analyzers are transitive, we'd Just Work without
30+
// the user having to determine if they need to add the package reference or not.
2631
if (!source.Left)
2732
return;
2833

0 commit comments

Comments
 (0)