Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cohost] Auto Insert tests for C# fail with the source generator turned on #10865

Open
davidwengier opened this issue Sep 10, 2024 · 2 comments
Labels
area-compiler Umbrella for all compiler issues Feature-Cohost
Milestone

Comments

@davidwengier
Copy link
Contributor

When the source generator is turned on the On Auto Insert tests in cohosting fail to deal with C# correctly. This doesn't seem to be a FUSE issue though, as existing LSP server tests for auto insert pass when forced to runtime code gen.

davidwengier added a commit that referenced this issue Sep 10, 2024
Skipped folding range test tracked by #10859
Skipped rename test tracked by #10856
Updated semantic tokens test tracked by #10857
Update folding range tests tracked by #10860
Update spell checking test tracked by #10863
Skipped formatting tests tracked by #10864
Skipped auto insert tests tracked by #10865
davidwengier added a commit that referenced this issue Sep 16, 2024
@davidwengier
Copy link
Contributor Author

davidwengier commented Sep 16, 2024

Found an issue in RemoteDocumentSnapshot which caused some parts of formatting to run on an older SourceText because the project snapshot was old, which means the generator didn't re-run. Have pushed that fix to the branch, but now we hit this exception from the generator on that path:

System.ArgumentException: An element with the same key but a different value already exists. Key: 'File1.razor'
   at System.Collections.Immutable.ImmutableDictionary`2.HashBucket.Add(TKey key, TValue value, IEqualityComparer`1 keyOnlyComparer, IEqualityComparer`1 valueComparer, KeyCollisionBehavior behavior, OperationResult& result)
   at System.Collections.Immutable.ImmutableDictionary`2.Add(TKey key, TValue value, KeyCollisionBehavior behavior, MutationInput origin)
   at System.Collections.Immutable.ImmutableDictionary`2.Builder.Add(TKey key, TValue value)
   at Microsoft.CodeAnalysis.HostOutputNode`1.AppendOutputs(IncrementalExecutionContext context, CancellationToken cancellationToken) in D:\Code\roslyn\src\Compilers\Core\Portable\SourceGeneration\Nodes\HostOutputNode.cs:line 82
-----

Help me Obi Wan @chsienki you're my only hope. I don't know what i'm doing wrong :)

@chsienki
Copy link
Contributor

@davidwengier Something very strange is going on deep in the generator driver code. It's actually very possibly a bug in the driver's host output logic. Will keep digging.

@phil-allen-msft phil-allen-msft added this to the 17.13 P1 milestone Sep 19, 2024
@phil-allen-msft phil-allen-msft added area-compiler Umbrella for all compiler issues and removed untriaged labels Sep 24, 2024
@jaredpar jaredpar modified the milestones: 17.13 P1, Backlog Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues Feature-Cohost
Projects
None yet
Development

No branches or pull requests

4 participants