SourceRequest: Lazily provide local file path?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Área
- backend-api-design, devtools
Línea de trabajo
Comienza revisando las definiciones del protocolo y la semántica de SourceResponse, SourceReference, Source.Path y SourceLoadedEvent. Compara los dos comportamientos propuestos en el issue y determina cuál puede especificarse sin romper los clientes existentes. Se considera completado cuando el cambio del protocolo y sus reglas de capacidades o compatibilidad del cliente estén acordados y documentados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- HTML
- Estrellas
- 1.8k
- Forks
- 173
- Merge medio
- 7 d 7 h
- PR fusionados (30 d)
- 2
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 microsoft/debug-adapter-protocol
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
microsoft/debug-adapter-protocol#633 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
microsoft/debug-adapter-protocol#599 · 8 reacciones ·
-
under-discussion
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
microsoft/debug-adapter-protocol#596 · 9 comentarios ·
Todos los issues de microsoft/debug-adapter-protocol
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
ArrayCollection::matching() throws a TypeError for composite expressions over array elements Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
doctrine/collections#554 · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
receptron/mulmoterminal#2264 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
openfoodfacts/robotoff#1957 ·
-
Replace biplist with plistlib Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
django-tastypie/django-tastypie#1702 ·