aboutcode-org / aboutcode-org/scancode.io

RFC: Store symbols, DWARFs, package, function names, .js.map, and related

Đang mở
#689 11 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
215
Fork
203
Merge trung bình
4 ngày 8 giờ
Pull request đã merge (30 ngày)
6

Mô tả

We need to design how to store symbols, DWARFs, Java package, or C# namespaces, function names, .js.map, and related symbols.

We can collect for instance DWARFs in SCTK with https://github.com/nexB/scancode-toolkit/issues/2422

We will soon support analyzing .js.map in SCIO with https://github.com/nexB/scancode.io/issues/650

In SCIO and later in SCTK and PurlDB, we need to have a proper way to store these symbols that are then used for devel_to_deploy mapping, indexed for matching for origin, and so on.

I suggest this approach:

A CodebaseResource (e.g., a file) would have one or more Symbol with these fields:

- `type`: one of path reference, symbol, string, etc.
- `data_source`: a code that describes what is the data source, like .js.map, DWARF, elf, Go pclntab, pdb, source code, etc.
- `symbol`: the value of the symbol as as tring
- `sequence_number`: the sequence of this symbol: starting at 1 for the first symbol of this type/data_source found in the file, and incremented in the order these are found.

For instance:
- `type`: "path_reference"
- `data_source`: ".js.map"
- `symbol`: "../../main/src/UiCaroussel.js"
- `sequence_number`: 1

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

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

Đánh giá

Issue này chưa được đánh giá.

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.