aboutcode-org / aboutcode-org/scancode.io

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

Ouverte
#689 11 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
215
Forks
203
Merge moyen
4 j 8 h
PR mergées (30 j)
6

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.