-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A fatal error occurred: The CodeQL database is not compatible with a QL library referenced by the query you are trying to run.General issue #8763
Comments
How did you create this database? Is it through the same CLI version that you are running the queries with? If not, do you know which cli version created the database? |
Also, if you're using a checkout of the go queries please make sure they are up to date. |
@aeisenberg , here is the process InstallationFirst, install CodeQL: export CODEQL_BIN_VERSION=2.8.5
mkdir -p $HOME/.local/tmp/codeql/src
mkdir -p $HOME/.local/codeql
rm -rf $HOME/.local/codeql/codeql
cd $HOME/.local/tmp/codeql/src
curl -s -L -O https://github.com/github/codeql-cli-binaries/releases/download/v${CODEQL_BIN_VERSION}/codeql-linux64.zip && \
unzip codeql-linux64.zip -d $HOME/.local/codeql
rm -rf codeql-linux64.zip Add CodeQL path to PATH=$HOME/.local/codeql/codeql:$PATH Next, download queries: export CODEQL_VERSION=1.27.0
cd $HOME/.local/codeql
git clone -b v${CODEQL_VERSION} --depth=1 https://github.com/github/codeql.git queries
git clone -b v${CODEQL_VERSION} --depth=1 https://github.com/github/codeql-go.git queries-go Run the following command to see supported languages and language packs: codeql resolve languages
codeql resolve qlpacks Building DatabaseNext, create CodeQL database: mkdir -p $HOME/.local/codeql/databases
cd $HOME/.local/codeql/databases
codeql database create \
--language="go" \
--source-root="${GOPATH}/src/github.com/greenpau/go-authcrunch" \
-- ./go-authcrunch The process runs and creates ---
sourceLocationPrefix: "/home/greenpau/dev/go/src/github.com/greenpau/go-authcrunch"
baselineLinesOfCode: 68565
unicodeNewlines: false
columnKind: "utf8"
primaryLanguage: "go"
creationMetadata:
sha: "6eac58e9e03a918ae09d4c0341acc08295944a7a"
cliVersion: "2.8.5"
creationTime: "2022-04-16T20:28:12.625549646Z" |
I'm not actually at my computer now, so I can't check for sure. That branch name looks suspicious. Can you try checking out main instead? Or the tag corresponding to the CLI version you are using? 2.8.5 |
@aeisenberg , |
@aeisenberg , issue solved. Followed advice from #7193 |
@aeisenberg , actually, let me reopen it, because I think there is a bug with the release 1.27.0. The release is missing the
|
Hmmm...that's interesting. It looks like that file was never ported to the lgtm branch. I'll create a new issue for this in the appropriate repo. Thanks for reporting. |
My mistake. The 1.27.0 branch is over a year old and predates the creation of the script. |
Description of the issue
Running the following command:
I get the above error:
Per the suggestion in the log, I try updating. It is up-to-date.
The text was updated successfully, but these errors were encountered: