-
I've generate the database from my source code. And If I modify something to the source code, How could I regenerate the database? I've tried the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Short answer: There's currently no better way than what you're already doing -- deleting the database and re-creating it. Longer explanation: For compiled languages, creating a CodeQL database observes a full build in order to interpret the source code correctly. It wouldn't be possible to update the information in the database correctly based purely on a source file diff -- for example, we wouldn't know what binaries that source file is linked to, what platforms/architectures it is compiled for, or what its compile-time dependencies are. For interpreted languages (like JavaScript and Python), you could in principle use an "extractor cache" to avoid re-processing unchanged files, but the extraction phase tends to be much less of a bottleneck there. What particular language are you working with here? |
Beta Was this translation helpful? Give feedback.
-
Is it possible to make the database like git(see https://github.com/dolthub/dolt)? thus we can query it anyway we want. @p0 |
Beta Was this translation helpful? Give feedback.
-
A year and a half after this issue has been raised, is there any new development/progress? |
Beta Was this translation helpful? Give feedback.
Short answer: There's currently no better way than what you're already doing -- deleting the database and re-creating it.
Longer explanation: For compiled languages, creating a CodeQL database observes a full build in order to interpret the source code correctly. It wouldn't be possible to update the information in the database correctly based purely on a source file diff -- for example, we wouldn't know what binaries that source file is linked to, what platforms/architectures it is compiled for, or what its compile-time dependencies are.
For interpreted languages (like JavaScript and Python), you could in principle use an "extractor cache" to avoid re-processing unchanged files, but the …