Removing and re-adding database with same folder path does not work properly
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- typescript, vscode
- Domínio
- devtools
Direção de pesquisa
Comece com o fluxo de remoção e readição do banco de dados da extensão do VS Code, usando as etapas numeradas de reprodução para observar o estado obsoleto. Reproduza o erro codeql-zip-archive depois de recriar o banco de dados e, em seguida, verifique se reabrir os arquivos de origem e os resultados das consultas funciona sem manter o estado do banco de dados anterior.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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).
- Linguagem predominante
- TypeScript
- Estrelas
- 539
- Forks
- 240
- Merge médio
- 2d 18h
- PRs com merge (30d)
- 37
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/vscode-codeql
-
bug VSCode
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
github/vscode-codeql#4471 · 1 comentário ·
-
bug enhancement VSCode
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
github/vscode-codeql#592 · 2 comentários ·
-
enhancement VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
github/vscode-codeql#4432 · 1 comentário ·
-
bug VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 64/100
github/vscode-codeql#4339 · 1 comentário ·
Todas as issues de github/vscode-codeql
Issues semelhantes
-
blocklist removal
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100