SourceRequest: Lazily provide local file path?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- backend-api-design, devtools
Direzione di ricerca
Inizia esaminando le definizioni del protocollo e la semantica di SourceResponse, SourceReference, Source.Path e SourceLoadedEvent. Confronta i due comportamenti proposti nell’issue e determina quale può essere specificato senza compromettere i client esistenti. Il lavoro è completato quando la modifica al protocollo e le relative regole sulle capacità o sulla compatibilità dei client sono concordate e documentate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Right now, adapters have two choices when providing a Source object (in stack trace, etc)
- Provide a local file name that the client can natively open by itself, with
Path - Provide a SourceReference that the client can then query lazily later
The problem with these 2 choices is that clients treat SourceReference-based files as ephemeral for the current session (aka "scripts"), and breakpoints etc will be discarded by the client when it stops/restarts a debugging session.
The usecase I am trying to address is SourceLink (or equivalent) methods of acquiring files that are permanent and immutable. If the client has something like the Parallel stacks view opened, it would be impractical to go do a billion SourceLink requests just to be able to give valid local paths, and so I use the SourceReference approach. However, the current shape of the SourceResponse is that it gives the raw content of the file, and the client will discard any user state it had for that file on restart.
In these usecases where the lazy files are immutable and permanent, I would like to be able to cache them to some adapter-defined arbitrary location and tell the client that the file now has a path as part of a SourceResponse.
Question / feature
This would technically be implementable today by clients if the adapter sends a SourceLoadedEvent alongside the SourceResponse, but this sounds hacky, and AFAIK this really does not fit the interpretation of SourceLoadedEvent of clients (or at least that of VS).
- Could SourceResponse be extended to include a filepath if one can be known lazily?
or another idea
- Could the protocol specify that if a
Sourceobject has bothPathandSourceReference, that the client must not attempt to open the physical file prior to sending aSourceRequest? That would give the opportunity to the adapter to fill the file. Of course with some new flag somewhere at the capabilities level or something, to opt into this new mode.
- Lingua principale
- HTML
- Stelle
- 1.8k
- Fork
- 173
- Merge medio
- 7g 7h
- PR unite (30g)
- 2
Preparare l'ambiente
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 microsoft/debug-adapter-protocol
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
microsoft/debug-adapter-protocol#633 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
microsoft/debug-adapter-protocol#599 · 8 reazioni ·
-
under-discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
microsoft/debug-adapter-protocol#596 · 9 commenti ·
Tutte le issue di microsoft/debug-adapter-protocol
Issue simili
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TulipaEnergy/TulipaEnergyModel.jl#1713 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
lbjlaq/Antigravity-Manager#3525 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
libretro/libretro-common#233 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
nasa/earthdata-varinfo#113 ·