aboutcode-org / aboutcode-org/scancode.io

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

Abierto
#689 11 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
215
Forks
203
Merge medio
4 d 8 h
PR fusionados (30 d)
6

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.