microsoft / microsoft/vscode-cpptools
The ability to reference data in configurations in tasks.json
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Type: Feature Request
A method of being able to reference a C/C++ configuration you have created in the tasks.json file to enable the passing of information and reduce the amount of work needed to keep tasks and configs the same.
Example usage:
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: g++.exe build all files",
"configuration": "GCC" <--- Line is needed when referencing configuration data and must match the name of a configuration
"command": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe",
"args": [
"-g",
"${workspaceFolder}/*.cpp",
"-L${configurationLibraryDirectory}", <-- Functions as a wildcard for the library directories
"-l${configurationsLibraries}, <-- Functions as a wildcard for the libraries
"-D${configurationDefines}", <-- Functions as a wildcard for the compiler defines
"-o",
"${workspaceFolderf}/out.exe"],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
The intention here would allow the user to add information straight from the configuration and pass that into the build command. There will be an error/warning if you try to reference a configuration without a name and any tasks that the user runs without adding the configuration name will ignore all configuration args. Additionally upon calling a build task that has a configuration referenced IntelliSense should automatically swap to that configuration if it isn't already selected. This should overall save time in maintaining the IntelliSense file and tasks file by only needing to change one file.
Guida per i contributori
Apri 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.
Direzione di ricerca
Inizia con tasks.json e con il comportamento della configurazione C/C++ e di IntelliSense descritto nella richiesta. Definisci come una configurazione denominata viene referenziata da un'attività di build, come vengono segnalati o ignorati i nomi mancanti e quando IntelliSense cambia configurazione. Il lavoro è completato quando gli argomenti dell'attività e i dati di configurazione rimangono sincronizzati tramite il meccanismo di riferimento richiesto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, typescript
- Ambito
- build-system, developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100