cryspen/hax

Attributes: deduplicate parent attributes

Offen

#123 geöffnet am 06.06.2023

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)OCaml (61 Forks)auto 404
P2frontendgood first issuehelp wantedkeep-open

Repository-Metriken

Stars
 (456 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 4T 22h) (42 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide