R: Workspace symbol search shows duplicate results that open read-only editors
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- devtools
Direzione di ricerca
Leggi extensions/positron-r/src/provider.ts ed esamina i due selettori di pattern in R_DOCUMENT_SELECTORS. Riproduci il duplicato aprendo le modifiche Git di un file R modificato e cercando un simbolo con # in Quick Open. Aggiungi lo schema file a entrambi i selettori, quindi conferma che la ricerca restituisce un risultato e che le copie di git diff non ricevono più queste funzionalità del linguaggio R.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When an R file has uncommitted git changes and a diff of it is open, searching for a symbol (#name in Quick Open) lists the symbol twice with the same label, e.g. save_pdf R/live.R. One result opens the real file. The other opens a read-only editor showing the HEAD version of the file. Each extra git copy that is open (staged version, other diff views) adds another duplicate.
Steps to reproduce
- Open a folder that is a git repo and contains an R file with a function, e.g.
R/live.Rwithsave_pdf <- function(x) x. - Edit and save
R/live.Rso it shows as modified. - Run Git: Open Changes on the file.
- Open Quick Open and type
#save_pdf.
Expected: one result. Actual: two save_pdf R/live.R results; picking the second opens a locked, read-only live.R with the old contents.
Cause
R_DOCUMENT_SELECTORS in extensions/positron-r/src/provider.ts includes { language: 'r', pattern: '**/*.{r,R}' } without a scheme, so it matches R documents under any scheme. The git: documents that back diff editors are synced to ark, which indexes them as separate files and returns them from workspace/symbol with their git: URIs. VS Code only merges symbols with identical URIs, and the label service shows the git: URI relative to the workspace folder, so both rows look the same.
Ark itself is not doing anything wrong: it only indexes the documents it is sent.
Suggested fix
Add scheme: 'file' to the two pattern selectors in R_DOCUMENT_SELECTORS. This also stops other LSP features (diagnostics, hover, etc.) from running on read-only git copies.
Positron 2026.12.0, ark 0.1.252+519.646f572, macOS.
Originally discovered by @Hadley.
- Lingua principale
- TypeScript
- Stelle
- 4.4k
- Fork
- 207
- Merge medio
- 1g 16h
- PR unite (30g)
- 308
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un 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 posit-dev/positron
-
area: assistant area: ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
accessibility area: plots area: ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area: plots area: ui bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Memory meter counts page cache as used memory under a cgroup limitForse già presa @jmcphers l’ha presa 10 giorni fa. Apertaarea: workbench bug memory-use support
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
posit-dev/positron#17414 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
area: remote host bug support
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
posit-dev/positron#17249 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di posit-dev/positron
Issue simili
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
novuhq/novu#13613 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement from-app needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nightly-labs/openbot#23943 ·
I maintainer di solito rispondono entro 1 giorno
-
comp/desktop desktop/chat P3 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
NousResearch/hermes-agent#164451 ·
I maintainer di solito rispondono entro 1 giorno
-
shortkeys-2188:ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
crittermike/shortkeys#1121 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Doist/todoist-cli#742 ·