Skip to content

--simulate-json follow-ups considered and deferred #37

Open

Description

@djbclark

Ideas from the #27 reviews and the size analysis that were deliberately left out:

  1. Make files an object keyed by path. JsonObjectAppendElement would de-duplicate for free and sort the output. It is a schema change, and arrays are more conventional.
  2. If PR 1 is still too big for a maintainer, split its file metadata into a follow-up: first path + change, then type, permissions, uid, gid, size, sha256 and target.
  3. Style nits from the Fable review: JsonArrayAppendPkgOperations() sits in libntech's JsonArrayAppend* namespace while its siblings are Add*ToJson(). create_chroot_file() in the unit test relies on EVAL_MODE to redirect MakeParentDirectory(), where MakeParentInternalDirectory(chrooted) would be explicit.
  4. The all-zero-digest check is now compact. The alternative was to drop it and match the other HashFile() callers.
  5. Windows is compiled but not exercised by upstream's public CI, so it's worth a MinGW cross-compile before each upstream PR. The MinGW build break found in the Added --simulate-json option to write the simulated change set as JSON #27 review was caught only by cross-compiling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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