microsoft / microsoft/vscode-cpptools
Compile single file, Preprocess single file
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.2k
- Forks
- 1.7k
- Merge medio
- 14 h 46 min
- PR fusionados (30 d)
- 61
Descripción
Type: Feature Request
In a separate discussion regarding compile_commands.json I outlined that the data contained within this json could be a great stepping-off point for a compile single file / preprocess single file feature in vscode: https://github.com/microsoft/vscode-cpptools/discussions/8308
Since the json has the path to the compiler and all the compiler arguments, it's all the information one needs to implement this feature. Typically compile single / preprocess single typically decorates a TU alongside a module compilation unit, its frequently overlooked, and tricky to add later (omit sibling TUs, skip calling linker). It's not unreasonable to "compile" arbitrary .h files, anything with compiler rules, just to a temp object. Likewise with preprocessing a file, it doesn't matter if the file in question is directly mentioned in a module build unit to be able to preprocess and present the preprocessor output in a temp document.
These features are useful in a tight iteration loop because full-bore builds may consider dozens or hundreds of units that end up generating redundant errors, and waste precious seconds delivering a round of errors into the eyeballs of the engineer. Likewise, preprocessing a file to a temp is a key iteration loop when authoring and testing tricky macro expansions.
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.
Línea de trabajo
Comienza con la discusión enlazada sobre compile_commands.json y el contexto de la extensión vscode-cpptools para entender cómo se exponen las rutas y los argumentos del compilador. La funcionalidad estaría completa cuando un archivo seleccionado pueda compilarse o preprocesarse de forma independiente, produciendo un objeto temporal o un documento de salida del preprocesador sin ejecutar la compilación completa ni el enlazador.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp, typescript, vscode
- Área
- build-system, compilers, devtools
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100