Skip to content

Should remove Display impl for semantic::Policy #885

@apoelstra

Description

@apoelstra

The Display impl for semantic policies is misleading to users because it resembles a compileable policy (and the objects have very similar names). This, combined with the fact that there's no way to go from a Miniscript back to a compileable policy except by abusing lift, encourages people to do this.

Apparently Miniscript Studio has exposed a "lift" button that produces a semantic policy and then stringifies it into a box labeled "policy" that users can attempt to compile from. This will appear to successfully round-trip in many cases but not others, leading to the impression of bugs.

It may be that people want to present the semantic policies to their users in some way, such as a graphical representation. But presenting it as a flat string that resembless a policy is bound to lead to confusion, and we shouldn't support that.

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