Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Unable to open file from source archive

Đang mở
#1,008 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript, vscode
Lĩnh vực
devtools

Hướng nghiên cứu

Bắt đầu bằng cách lần theo luồng của tiện ích mở rộng CodeQL VS Code mở các tệp từ kho lưu trữ mã nguồn src.zip của cơ sở dữ liệu, sử dụng URI codeql-zip-archive được báo cáo và lỗi pipes làm manh mối. Tái hiện việc thiết lập cơ sở dữ liệu bằng các lệnh CodeQL CLI được liệt kê, sau đó xác minh rằng các tệp mã nguồn và vị trí kết quả truy vấn mở thành công, đồng thời URI được tạo không còn lỗi nữa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug VSCode

Describe the bug

It is not possible to open files from the codeql source archive.

The codeql database was created locally with codeql CLI like follows:

cmake -B build -DCMAKE_VERBOSE_MAKEFILE=ON $PWD
codeql database init --overwrite --language=cpp --source-root=$PWD codeql-db
codeql database trace-command codeql-db --working-dir=$PWD/build -- make
codeql database finalize codeql-db

Then, the DB was added to the codeQL VSCode extension as "From a folder". In the codeql-db directory there is a file src.zip (seen in the screenshot). However, when I try to open a file (by clicking on it in the explorer), I've got an error message which says: "Unable to open 'example.cpp (read-only)': Unable to read file 'codeql-zip-archive://0-52/home/a.bokowy/codeql-presentation/codeql-db/src.zip/home/a.bokowy/codeql-presentation/example.cpp' (TypeError: Cannot read property 'pipes' of undefined)." The strange thing though is the 0-52 before the /home in the codeql-zip-archive URI.

codeql-unable-to-open-db-file

It's also not possible to open the location of the query by clicking on the file name in the CodeQL Query Result explorer.

codeql-query-works

Version

Version: 1.59.0 (system setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.19042

CodeQL extension version: 1.5.6
CodeQL CLI version: 2.7.1
Platform: linux x64

Expected behavior
Be able to open files from source archive.

Additional info
The strange thing is, that "sometimes" I am able to add database source to the explorer, so I'm able to open files, see query results and browse AST. I don't know how to reproduce the correct behavior, though. I've tried various things, like removing codeQL database from VSCode, restarting VSCode and then adding codeQL DB once more, etc. None of these attempts has resulted in successful outcome.

Ngôn ngữ chính
TypeScript
Star
539
Fork
240
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
29

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/vscode-codeql

Tất cả issue của github/vscode-codeql

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.