Removing and re-adding database with same folder path does not work properly
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- typescript, vscode
- Bereich
- devtools
Rechercherichtung
Beginne mit dem Ablauf zum Entfernen und erneuten Hinzufügen der Datenbank in der VS Code-Erweiterung und beobachte anhand der nummerierten Reproduktionsschritte den veralteten Zustand. Reproduziere den Fehler codeql-zip-archive nach dem erneuten Erstellen der Datenbank und überprüfe anschließend, dass das erneute Öffnen von Quelldateien und Abfrageergebnissen funktioniert, ohne den Zustand der vorherigen Datenbank beizubehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Version
Extension 1.4.5
CodeQL CLI 2.5.1
Describe the bug
Removing a database after having run queries on it and viewed ASTs and then re-adding a different database at the same file system location (e.g. because you made changes to the source code and then created the database again) prevents browsing the source code of that database.
To Reproduce
- Create a folder
test-db - In that folder create a
Test.javafile with this content:class Test { } - Run
codeql database create --language=java --source-root=. "--command=javac *.java" db - In VSCode add the
test-db/dbfolder as database - Run any query, e.g.:
import java from Class c where c.fromSource() select c - Click on the result to open the
.javasource - Run "View AST"
- Optional: Close the
.javafile and remove the AST view and the query result from the list - Use "Remove Database"
- Make a change to the
Test.javafile:class Test { void someMethod() { } } - Delete the
test-db/dbfolder and create the database again:codeql database create --language=java --source-root=. "--command=javac *.java" db - In VSCode add the database again
- Run any query again, and click on the result
❌ Nothing happens; the CodeQL Query Server output contains:
Similarly, clicking on theUnable to handleMsgFromView: cannot open codeql-zip-archive://1-51/#REDACTED#%5Ctest-db%5Cdb%5Csrc.zip/#REDACTED#/test-db/Test.java. Detail: Unable to read file 'codeql-zip-archive://1-51/#REDACTED#\test-db\db\src.zip/#REDACTED#/test-db/Test.java' (Error: unexpected end of file)Test.javasource file in the files explorer of VSCode causes a similar error.
Note: Steps 5 - 8 (inclusive) might not be needed to reproduce this.
Expected behavior
When re-adding a database for which a database with the same folder path existed previously, all state of that previous database should be removed.
Removal of previous database state could happen either when the database is removed, or when a database with the same folder path is re-added. Maybe it would be better to only perform this when re-adding the database (instead of on removal) to allow the user to still view some information after the database has been removed (might be useful when importing test databases).
- Vorherrschende Sprache
- TypeScript
- Sterne
- 539
- Forks
- 240
- Ø Merge
- 2 T. 18 Std.
- Gemergte PRs (30 T.)
- 37
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/vscode-codeql
-
bug VSCode
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/vscode-codeql#4471 · 1 Kommentar ·
-
bug enhancement VSCode
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/vscode-codeql#592 · 2 Kommentare ·
-
enhancement VSCode
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
github/vscode-codeql#4432 · 1 Kommentar ·
-
bug VSCode
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 64/100
github/vscode-codeql#4339 · 1 Kommentar ·
Alle Issues in github/vscode-codeql
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
bug v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
modelcontextprotocol/inspector#2458 · 1 Kommentar ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
carbon-design-system/ibm-products#9907 ·