cryspen/hax

Attributes: deduplicate parent attributes

Ouverte

#123 ouverte le 6 juin 2023

 (4 commentaires) (0 réaction) (0 personne assignée)OCaml (61 forks)auto 404
P2frontendgood first issuehelp wantedkeep-open

Métriques du dépôt

Stars
 (456 étoiles)
Métriques de merge PR
 (Merge moyen 4j 22h) (42 PRs mergées en 30 j)

Description

For now, we extract every item that lives in a crate, but not modules. Indeed, if we disregard attributes, a module is really just a group of items, so having modules as such is not useful, we can recover the module structure looking at names.

However, modules can also carry attributes, so we need a way of retrieving them. Either: - we extract mod items, consisting of a list of names plus a list of attributes; - we add a parent_attributes field on each item, but that will cause duplication of attributes.

I think having mod items is the way to go.

Because it was easier, the -ugly- second option was implemented.

Instead, I think we should extract a simple mapping from module def_ids to attributes, in addition to a list of items.

Guide contributeur