cryspen/hax

Attributes: deduplicate parent attributes

开放

#123 创建于 2023年6月6日

 (4 条评论) (0 个反应) (0 位负责人)OCaml (61 个派生)auto 404
P2frontendgood first issuehelp wantedkeep-open

仓库指标

星标
 (456 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南