Skip to content

Use #[track_caller] to make automated namespacing useful #250

@Pratyush

Description

@Pratyush

In the new refactor of the ConstraintSystem API, one doesn't have to thread &mut cs.ns(|| "new namespace") everywhere. While this enables lots of improvements, such as overloading arithmetic operators for field and group variables, the lack of meaningful human annotated names does cause a regression in diagnostics, debugging, and profiling.

The current approach would be to do manual annotations using the cs.ns() API, and this provides some high level information, but for most profiling/debugging use cases, but this doesn't suffice. A better way would be automatically annotate the relevant namespaces with file, line number and column information using the Location API in combination with #[track_caller]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions