Removing and re-adding database with same folder path does not work properly
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript, vscode
- Ambito
- devtools
Direzione di ricerca
Inizia con il flusso di rimozione e aggiunta nuovamente del database dell’estensione VS Code, utilizzando i passaggi numerati per la riproduzione per osservare lo stato obsoleto. Riproduci l’errore codeql-zip-archive dopo aver ricreato il database, quindi verifica che la riapertura dei file sorgente e dei risultati delle query funzioni senza conservare lo stato del database precedente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- 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
- 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.
Altre issue di github/vscode-codeql
-
bug VSCode
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/vscode-codeql#4471 · 1 commento ·
-
bug enhancement VSCode
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/vscode-codeql#592 · 2 commenti ·
-
enhancement VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
github/vscode-codeql#4432 · 1 commento ·
-
bug VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
github/vscode-codeql#4339 · 1 commento ·
Tutte le issue di github/vscode-codeql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fil-donadoni/tolaria#4409 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
corsairdev/corsair#1764 ·