Skip to content

Idempotency error on pure A.{x} within a function #1074

@Niols

Description

@Niols

As of 439f0d1:

with_
  (fun x ->
     pure A.{x})

I don't even understand why Topiary is trying to multi-line pure A.{x} and I think it should not, if only for consistency with other places.

Logs:

[2025-09-03T10:34:01Z ERROR topiary_core] Failed idempotence check
[2025-09-03T10:34:01Z ERROR topiary_core] Diff < left / right > :
     with_
       (fun x ->
    <    pure A.{
    <      x
    <    }
    >    pure
    >      A.{
    >        x
    >      }
       )
     
    
[2025-09-03T10:34:01Z ERROR topiary] The formatter did not produce the same
    result when invoked twice (idempotence check).
    
    If this happened with the built-in query files, it is a bug. It would be
    helpful if you logged this error at
    https://github.com/tweag/topiary/issues/new?assignees=&labels=type%3A+bug&template=bug_report.md

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