Skip to content

Coarse-grained tracked structs #598

@nikomatsakis

Description

@nikomatsakis

As described in this hackmd, we want to change how tracked struct dependencies work. The basic idea is to switch the default: instead of labeling some fields as #[id] and having the rest be independently tracked, we will have fields be #[id] by default unless they are annotated with #[salsa::tracked]. This is a fairly straightforward change that can be done in the proc-macro.

Example

Before:

#[salsa::tracked]
struct Function {
    #[id]
    name: String,
    body: String,
}

After:

#[salsa::tracked]
struct Function {
    name: String,

    #[salsa::tracked]
    body: String,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions