Project dependencies not discoverable (Open Folder extensibility)

Abierto
#2,257 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
csharp, node.js

Línea de trabajo

Comienza con el uso de Open Folder indexing service, GetProjectConfigurationServiceAsync, GetIndexWorkspaceService y GetFileReferencesAsync mostrado en el issue. Determina si Node.js tooling expone las rutas de los archivos de dependencias mediante las interfaces estándar FileReferenceResult o FileReferenceInfoType; se considera completado cuando las dependencias se pueden descubrir para una Open Folder Node.js Express app a través de ese servicio común.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Nodejs tooling is indicated to support Open Folder.

Expected Behavior

After creating an empty Nodejs Express app, switching to folder view (therefore project is loaded by Open Folder), I expected to be able to retrieve the dependencies of the express app using the Open Folder indexing service,

var projConfigService = await workspace.GetProjectConfigurationServiceAsync();
var currStartupFile = projConfigService.CurrentProject.FilePath;
var indexService = workspace.GetIndexWorkspaceService();
var dependencyResult = await indexService.GetFileReferencesAsync(currStartupFile, referenceTypes: (int)FileReferenceInfoType.Dependency));
// dependencyResult is empty :( 
Actual Behavior

The dependencyResult result set is empty, in addition to the result sets returned when trying this with other types of FileReferenceInfoType. It appears that Nodejs tooling does not implement support for the Open Folder indexing service.

Additional Context

One of the reasons that the Open Folder feature exists is to facilitate extension authors to create rich features for any language, by defining common extension points such as FileReferenceResult. Otherwise an extension author has to consider the special cases of each language and the way that the tooling has been implemented, making it infeasible to ship language agnostic extensions.

I'm hoping there is a way to discover dependency locations (file paths) for Nodejs project loaded in Visual Studio Open Folder that isn't unique to Nodejs (exposed by some standard set of interfaces).

Information and guidance relating to this would be much appreciated :)

Lenguaje dominante
C#
Estrellas
1.8k
Forks
355
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/nodejstools

Todos los issues de microsoft/nodejstools

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.