Skip to content

Why does compiling a .circom file with a WitnessTester update that file's LastModifiedAt timestamp? #120

@dsernst

Description

@dsernst

Setup

If I have MyCircuit.circom, and then a unit test that includes:

const circuit = await circomkit.WitnessTester('MyCircuit', {
  file: './MyCircuit.circom',
  template: 'MyCircuit',
})

every time this unit test runs, the referenced MyCircuit.circom file's mtime aka Last Modified At timestamp is also updating.

Even though running the unit test does not change any of the contents of the .circom file itself.

(The compiled build outputs might have changed, sure, but that's not what I'm talking about).

Command to Verify:

One way to verify this, from a MacOS shell:

mdls -name kMDItemContentModificationDate ./MyCircuit.circom

Impact:

This makes it significantly more difficult to watch .circom files for changes, and then trigger unit tests. Because currently this creates infinite loops.

I've spent quite a lot of time digging into the circomkit internals, and circom_tester, but didn't yet track down the source of this. It seems pretty clearly unintended, buggy behavior. Would love to see it fixed, or at least if anyone can help point to where exactly this is being caused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions