codeql-cli-binaries
codeql-cli-binaries copied to clipboard
`evaluation/runQueries` query server command fails silently if it fails to acquire the database lock
Hi!
When having several query servers running on the same database (eg: VSCode + CodeQL.nvim) the first one running a query acquires a lock for the database, and running a query using evaluation/runQueries command on the second one fails silently without returning the reason of the failure.
Is this when using the new evaluation/registerDatabases command to register each database? And what version of the CLI is this? Trying to register the second database using evaluation/registerDatabases should fail.
I'm on 2.4.1, but this is not related to evaluation/registerDatabases as it was already happening before I added support for db registration to codeql.nvim.
I also expected the second evaluation/registerDatabases (to a different or same query server) to fail, but it doesnt.
Unless there is a bug in neovim RPC client handling of JSON RPC errors, the evaluation/runQueries command does not return any errors when failing due to not being able to acquire the db lock. The only way to know if the evaluation/runQueries commands succeeded is to verify if the bqrs file was created as Im doing here