Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Extension does not properly start when no CodeQL CLI is found

Aperta
#904 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript, vscode
Ambito
devtools

Direzione di ricerca

Inizia dal flusso di avvio dell’estensione, dalla gestione del percorso dell’eseguibile di CodeQL CLI e dal percorso di verifica degli aggiornamenti descritto nella riproduzione. Riproduci il problema con un percorso CLI non valido e con la cartella dei download rimossa, quindi esamina i log e il comportamento del comando «CodeQL: Quick query». Il lavoro è completato quando l’avvio segnala l’assenza della CLI, rispetta un percorso configurato e l’azione di installazione funziona senza richiedere una modifica alla configurazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug VSCode

Describe the bug
It looks like when no CodeQL CLI is found on start up the extension does not start properly. This is noticable as:

  • No "CodeQL" / "CodeQL CLI v ..." is shown in the bottom right corner
  • CodeQL CLI is not downloaded automatically? See #900
  • Once an extension config change is made, the extension seems to start properly, downloading CodeQL CLI; even if the config change was specifying a custom CodeQL CLI executable path

Edit: Might only occur when update check was performed recently and the following was logged:

Didn't perform CodeQL CLI update check since a check was already performed within the previous 86400 seconds.

Version
Extension:

CodeQL extension version: 1.5.1 
CodeQL CLI version: 2.5.7 
Platform: win32 x64

VSCode:

Version: 1.57.1 (user setup)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:07.755Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19041

To reproduce
Prerequisites:
Extension is already installed and the default CodeQL CLI has been downloaded by the extension already.

  1. Open the CodeQL extension settings (@ext:github.vscode-codeql)
  2. Change "CodeQL > CLI: Executable Path" to an invalid path
  3. Restart VSCode
  4. Trigger loading of extensions, e.g. by clicking on CodeQL icon on the left sidebar
    ❌ Notice how neither an error dialog is shown, nor does the "CodeQL" info text in the bottom right corner appear.
    The logs show that the extension failed finding the CodeQL CLI.
    ℹ️ Only in case you had not downloaded CodeQL CLI yet and the executable path is empty it shows the error "The CodeQL CLI could not be found."
  5. Run an extension command such as "CodeQL: Quick query"; on the error message click "Install CodeQL CLI"
    ❌ Nothing happens
  6. Stop VSCode
  7. Open the CodeQL CLI download folder; on Windows %appdata%\Code\User\globalStorage\github.vscode-codeql
  8. Delete or rename the distribution folder
  9. Start VSCode again
  10. Open the CodeQL extension settings (@ext:github.vscode-codeql)
  11. Change "CodeQL > CLI: Executable Path" to any non-empty path
    ❌ Instead of checking whether the CodeQL CLI exists at the specified path, the extension starts downloading the default CodeQL CLI

Expected behavior
The extension should properly start even without CodeQL CLI; all the incorrect behavior described above (marked with ❌) should not happen.

Lingua principale
TypeScript
Stelle
539
Fork
240
Merge medio
2g 6h
PR unite (30g)
29

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/vscode-codeql

Tutte le issue di github/vscode-codeql

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.