Diagnostics published for `git:` documents in the diff editor: project usings faded as unnecessary (IDE0005)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp, typescript, vscode
- Ambito
- developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 3.1k
- Fork
- 742
- Merge medio
- 1g 3h
- PR unite (30g)
- 53
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dotnet/vscode-csharp
-
Remove temporary .NET 11 CI container digest pinForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaInfrastructure Test
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
dotnet/vscode-csharp#9791 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
untriaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
dotnet/vscode-csharp#9940 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bug C#DK
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
dotnet/vscode-csharp#9910 ·
I maintainer di solito rispondono entro 1 giorno
-
aApertaC#DK untriaged
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
dotnet/vscode-csharp#9901 ·
I maintainer di solito rispondono entro 1 giorno
-
Debugger untriaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
dotnet/vscode-csharp#9891 · 9 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/vscode-csharp
Issue simili
-
ArcGIS Maps SDK for JavaScript c-carousel calcite-design-tokens enhancement impact - p3 - not time sensitive needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Esri/calcite-design-system#15565 ·
I maintainer di solito rispondono entro 1 giorno
-
customer-reported question
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Azure/azure-rest-api-specs#48017 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/TypeScript#65370 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
ts-graphviz/ts-graphviz#1904 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno