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
"codeql database create" command cannot recognize the relative path in "import" (Python/Go) #13051
Comments
|
I am only familiar with CodeQL for Go, not python. I will try to get a colleague who works on python to answer when they are available. We extract relative imports in Go correctly as long as the build is set up correctly. Can you point me to a repository where this doesn't work? Alternatively, the build logs might help me diagnose what is happening (along with some idea of the layout of the repo). One situation I am aware of where it doesn't work is when there is a go.mod file which is not in the root of the repository. Say it is in folder |
|
Solved this problem on python project , using a |
|
For GO,does CodeQL only find module dependencies through go mod? I am not using go mod to manage modules, but instead specifying the module path through GOPATH at compile time. In this case, I found that codeql database create command will enter an infinite loop. |
|
@EndlessConf In the absence of a go.mod we do the best that we can. Are you running locally or in CI? Can you point me to an example repo where it doesn't work? If it doesn't work then you can provide a build command, which normally solves the problem. |
|
Sorry, this issue came up about a month ago when I was trying to write a Go demo to test CodeQL. |
|
@y0utiao can you please link to a open-source repo, or create a minimal working example repo that has this problem? @EndlessConf please open a new issue for asking new questions next time 😊 |
If the project use relative path to import module lilke below:
The
. .. ...will cause WARN when you use codeql database create, here is the log:Python and Go has the same problem, how can I fix this WARN?
The text was updated successfully, but these errors were encountered: