Diagnostics published for `git:` documents in the diff editor: project usings faded as unnecessary (IDE0005)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- csharp, typescript, vscode
- Área
- developer-experience
Línea de trabajo
Start with the repro in FreHu/csharp-diff-usings-repro and its README, then open a C# file in a working-tree diff to compare the file: and git: sides. Read the earlier fix in dotnet/roslyn#85886 and the related issue #9831 to see how git: documents are currently analysed. Done when git: documents publish no diagnostics, the file: side still does, and hover and colouring still work on the historical side.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Issue Description
When a C# file is opened in the diff editor, the historical side (a git: document) is analysed as a miscellaneous file: framework references only, no project. Every using of a project namespace then fails to resolve and is faded as Using directive is unnecessary. (IDE0005). In a real codebase, where most usings are project namespaces, nearly every using on the historical side of every diff is faded.
The working-tree (file:) side of the same diff is analysed correctly.
Same root cause as #9831. Its fix (dotnet/roslyn#85886) stopped the Razor syntax errors on these documents but diagnostics are still published for them.
Steps to Reproduce
Repro: https://github.com/FreHu/csharp-diff-usings-repro. Steps are in its README.
I originally noticed this with C# Dev Kit installed; the repro uses a profile with only the C# extension to rule it out.
Expected Behavior
No diagnostics on git: documents. They are past, read-only versions: nothing reported on them can be acted on, and without project context the analysis is wrong. The file: side of a working-tree diff keeps normal diagnostics. Hover, navigation and semantic colouring on the historical side are welcome to stay.
Actual Behavior
using Repro.Models;(project namespace) is faded with IDE0005 on everygit:side;using System.Text;(framework) is not.- The
file:side of a working-tree diff is correct.Invoicegets type colouring only there.
Environment
- VS Code: 1.144.1
- C#: 2.160.4
- .NET SDK: 10.0.203
- OS: Windows 10 Pro 10.0.19045
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.1k
- Forks
- 742
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 53
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/vscode-csharp
-
Remove temporary .NET 11 CI container digest pinQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoInfrastructure Test
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
dotnet/vscode-csharp#9791 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
C# extension crach in VS CodeAbiertountriaged
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
dotnet/vscode-csharp#9940 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Bug C#DK
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
dotnet/vscode-csharp#9910 ·
Los mantenedores suelen responder en 1 día
-
aAbiertoC#DK untriaged
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
dotnet/vscode-csharp#9901 ·
Los mantenedores suelen responder en 1 día
-
Debugger untriaged
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
dotnet/vscode-csharp#9891 · 9 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/vscode-csharp
Issues similares
-
Navbar avatar and name stay stale after saving profile changesPosiblemente ocupada @alexechoi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
marmelab/atomic-crm#416 ·
Los mantenedores suelen responder en 1 día
-
feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
bluesky-social/social-app#12343 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lucide-icons/lucide#5165 ·
Los mantenedores suelen responder en 1 día
-
[Feature] Preferences - Keep the theme selection popover open after selection for quick previewAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
marktext/marktext#6033 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:desktop bug has repro platform:macos
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
anthropics/claude-code#107903 ·