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

Unable to open file from source archive

Aperta
#1,008 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia tracciando il flusso dell’estensione CodeQL per VS Code che apre i file dall’archivio sorgente src.zip del database, usando come indizi l’URI codeql-zip-archive segnalata e l’errore pipes. Riproduci la configurazione del database con i comandi CodeQL CLI elencati, quindi verifica che i file sorgente e le posizioni dei risultati delle query vengano aperti correttamente e che l’URI generato non fallisca più.

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

Descrizione

bug VSCode

Describe the bug

It is not possible to open files from the codeql source archive.

The codeql database was created locally with codeql CLI like follows:

cmake -B build -DCMAKE_VERBOSE_MAKEFILE=ON $PWD
codeql database init --overwrite --language=cpp --source-root=$PWD codeql-db
codeql database trace-command codeql-db --working-dir=$PWD/build -- make
codeql database finalize codeql-db

Then, the DB was added to the codeQL VSCode extension as "From a folder". In the codeql-db directory there is a file src.zip (seen in the screenshot). However, when I try to open a file (by clicking on it in the explorer), I've got an error message which says: "Unable to open 'example.cpp (read-only)': Unable to read file 'codeql-zip-archive://0-52/home/a.bokowy/codeql-presentation/codeql-db/src.zip/home/a.bokowy/codeql-presentation/example.cpp' (TypeError: Cannot read property 'pipes' of undefined)." The strange thing though is the 0-52 before the /home in the codeql-zip-archive URI.

codeql-unable-to-open-db-file

It's also not possible to open the location of the query by clicking on the file name in the CodeQL Query Result explorer.

codeql-query-works

Version

Version: 1.59.0 (system setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.19042

CodeQL extension version: 1.5.6
CodeQL CLI version: 2.7.1
Platform: linux x64

Expected behavior
Be able to open files from source archive.

Additional info
The strange thing is, that "sometimes" I am able to add database source to the explorer, so I'm able to open files, see query results and browse AST. I don't know how to reproduce the correct behavior, though. I've tried various things, like removing codeQL database from VSCode, restarting VSCode and then adding codeQL DB once more, etc. None of these attempts has resulted in successful outcome.

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.