Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Unable to open file from source archive

Offen
#1,008 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
typescript, vscode
Bereich
devtools

Rechercherichtung

Beginnen Sie damit, den Ablauf der CodeQL VS Code extension nachzuverfolgen, der Dateien aus dem src.zip-Quellarchiv der Datenbank öffnet, und verwenden Sie die gemeldete codeql-zip-archive-URI sowie den Fehler pipes als Hinweise. Reproduzieren Sie die Einrichtung der Datenbank mit den aufgeführten CodeQL CLI-Befehlen und überprüfen Sie anschließend, dass Quelldateien und Positionen von Abfrageergebnissen erfolgreich geöffnet werden und dass die generierte URI nicht mehr fehlschlägt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
539
Forks
240
Ø Merge
2 T. 6 Std.
Gemergte PRs (30 T.)
29

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/vscode-codeql

Alle Issues in github/vscode-codeql

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.