aboutcode-org / aboutcode-org/scancode.io

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

オープン
#689 コメント 11 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
215
フォーク
203
平均マージ
4日 8時間
マージ済み PR(30日)
6

説明

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

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

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

評価

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

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

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