github / github/codeql

TypeScript extraction hangs

オープン
#17,827 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

We have an issue with CodeQL analysis where it would hang while extracting the files from the PR.

I've found which part was causing this and made a separate reproducible code snippet.
Here's a minimal reproducible example:

```
class Test {
static methodA>() {}
static methodB>() {}
}
```

Output logs

```
➜ temp-codeql-bug codeql version
CodeQL command-line toolchain release 2.19.2.
Copyright (C) 2019-2024 GitHub, Inc.
Unpacked in: /home/dubenko/codeql
Analysis results depend critically on separately distributed query and
extractor modules. To list modules that are visible to the toolchain,
use 'codeql resolve packs' and 'codeql resolve languages'.
➜ temp-codeql-bug codeql database create test --language=javascript --verbosity="progress+++" --overwrite
Writing logs to /home/dubenko/temp-codeql-bug/test/log/database-create-20241023.152003.392.log.
Initializing database at /home/dubenko/temp-codeql-bug/test.
Scanning for [codeql-extractor.yml] from /home/dubenko/codeql/.codeqlmanifest.json
Parsing /home/dubenko/codeql/csv/codeql-extractor.yml.
Parsing /home/dubenko/codeql/swift/codeql-extractor.yml.
Parsing /home/dubenko/codeql/cpp/codeql-extractor.yml.
Parsing /home/dubenko/codeql/properties/codeql-extractor.yml.
Parsing /home/dubenko/codeql/java/codeql-extractor.yml.
Parsing /home/dubenko/codeql/go/codeql-extractor.yml.
Parsing /home/dubenko/codeql/javascript/codeql-extractor.yml.
Parsing /home/dubenko/codeql/xml/codeql-extractor.yml.
Parsing /home/dubenko/codeql/yaml/codeql-extractor.yml.
Parsing /home/dubenko/codeql/html/codeql-extractor.yml.
Parsing /home/dubenko/codeql/ruby/codeql-extractor.yml.
Parsing /home/dubenko/codeql/python/codeql-extractor.yml.
Parsing /home/dubenko/codeql/csharp/codeql-extractor.yml.
Calculating baseline information in /home/dubenko/temp-codeql-bug
Ignoring the following directories when processing baseline information: .git, .hg, .svn.
Running command in /home/dubenko/temp-codeql-bug: /home/dubenko/codeql/tools/linux64/scc --by-file --exclude-dir .git,.hg,.svn --format json --no-large --no-min .
Running command in /home/dubenko/temp-codeql-bug: [/home/dubenko/codeql/javascript/tools/configure-baseline.sh]
Ignored an additional 92 files when processing baseline information for TypeScript Typings due to paths and paths-ignore configuration.
Ignored an additional 7 files when processing baseline information for JavaScript due to paths and paths-ignore configuration.
Found 2 baseline files for javascript.
Calculated baseline information for languages: javascript (69ms).
Resolving extractor javascript.
Found candidate extractor root for javascript: /home/dubenko/codeql/javascript.
Successfully loaded extractor JavaScript/TypeScript (javascript) from /home/dubenko/codeql/javascript.
Created skeleton CodeQL database at /home/dubenko/temp-codeql-bug/test. This in-progress database is ready to be populated by an extractor.
Running build command: []
Running command in /home/dubenko/temp-codeql-bug: [/home/dubenko/codeql/javascript/tools/autobuild.sh]
[2024-10-23 15:20:04] [build-stdout] Single-threaded extraction.
[2024-10-23 15:20:04] [build-stdout] package.json: Main file set to src/index.ts
[2024-10-23 15:20:04] [build-stdout] Found Node.js at: node
[2024-10-23 15:20:04] [build-stdout] Found Node.js version: v22.1.0
[2024-10-23 15:20:04] [build-stdout] Opening project /home/dubenko/temp-codeql-bug/tsconfig.json
[2024-10-23 15:20:04] [build-stdout] Memory for TypeScript process: 2000 MB, and 400 MB reserve
[2024-10-23 15:20:04] [build-stdout] Done opening project /home/dubenko/temp-codeql-bug/tsconfig.json (433 ms)
[2024-10-23 15:20:04] [build-stdout] Extracting /home/dubenko/temp-codeql-bug/src/index.ts
```

Codeql only hangs if there are two methods, if you remove one of them it works.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。