Skip to content

manifest.json makes no-op changes on disk very frequently #637

@amonks

Description

@amonks

Thanks for your work on this extension! It's very useful.

I'd like to share user scripts between machines by committing the data folder to my dotfiles repo. I observe that the manifest.json file in this folder[1] changes on disk every few minutes, even when I'm not interacting with the extension, and the changes only vary the json key order (which seems to me like it ought to be a no-op).

[1]: Library/Containers/com.userscripts.macos.Userscripts-Extension/Data/Documents/manifest.json
  1. I'm a bit curious what behavior is causing this file to thrash in the first place — I'm surprised that the extension needs to write this file in the background at all (writing the file in response to interaction would not be surprising) — maybe this is a bug?
  2. If this background process is necessary and not a bug, I wonder if setting encoder.outputFormatting = [.prettyPrinted, .sortedKeys] here would do the trick

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceChores and refactoring

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions