2023-11-03 Nix team meeting minutes #100

Attendees: @Ericson2314 @roberth @thufschmitt @edolstra @tomberek @infinisil
Notes by: @infinisil

Notes

Git smudging

  • @roberth: It’s possible to get a git tree hash from GitHub, even using just the CLI without libgit
  • libgit might make it easier though: Introduce libgit2 by edolstra · Pull Request #9240 · NixOS/nix · GitHub
    • @edolstra: Should have smudging tests before that PR to make sure it still works before changing it
  • Don’t support .gitattributes filtering
    • Make it an error if non-empty? Maybe with a flag to get around it
    • @roberth: Support smudging in impure mode?
      • @edolstra: Would require keeping around a non-libgit version
      • Actually libgit supports line ending and $id filters, could theoretically support those
  • @tomberek: Something with libarchive is related, there’s a special ._ to signal certain attributes on Darwin, which then disappears and can cause a NAR hash change, caused problems with a Nixpkgs package before
    • Was a problem with gitolite, but now fixed
    • GitHub - tomberek/test-xattrs
    • Should be able to turn it off somehow, maybe --no-mac-metadata is related
    • But this is already stable
    • Might need special macOS file creation operations to fix
    • @roberth: Seems like this is a macOS specific gnutar extension, should be clear about only supporting the basic version
    • Decision: This is a bug and should be turned off if possible
    • @tomberek will try that

Next stabilisation steps

  • fetchTree docs in progress: document `fetchTree` by fricklerhandwerk · Pull Request #9258 · NixOS/nix · GitHub

    • Also some work by @Ericson2314 to make the docs be closer to the source code
  • Anything else to do for fetchTree?

    • @roberth: Looked at the attributes, turns out it’s very untyped, making it hard to understand, no single place to see what’s supported by a fetcher.
      • Tried refactoring but turned out to be tricky (at least for fetchGit).
      • fetchTree seems to have a lot of code just for fetchGit, potential for refactoring
      • While only implementation details, stabilising this would make it harder to get more uniformity later.
      • Wouldn’t be a big deal if it’s not stable yet, then we could just change this
    • @thufschmitt: Anything concrete to change?
      • @roberth: Attributes handled very arbitrarily, could be improved
      • @Ericson2314: Figuring out and making it consistent
      • @edolstra: The time for this has passed, we shouldn’t change it much now
      • @thufschmitt: Shouldn’t have to wait for the interface to be perfect
      • @Ericson2314: Haven’t really looked at flakes before
      • @roberth: We even said we wouldn’t touch flakes in the beginning
    • @thufschmitt: How about letting the design of fetchTree be discussed until say release 2.20
      • @edolstra: We’re not getting anywhere like this
      • @roberth: We shouldn’t underestimate the complexity of the code, we need to take care
      • @edolstra: All fetchers have a limited reproducibility guarantee
      • @Ericson2314: Maybe this is one of the harder parts of Flakes, other parts may be easier
      • @thufschmitt: Initially I thought fetchTree was an implementation detail, but it looks like it’s more important, tied to the lock file
      • @thufschmitt: With this 1.5 month plan, should advertise it widely to commit ourselves to the timeline
      • Generally vision is clear, just not enough resources for implementation
      • @edolstra: I doubt people would give fetchTree feedback
  • Instead of a Flakes plan announcement, fetchTree plan announcement?

    • @Ericson2314: Emphasise short-term
    • Might be able to get help/feedback, encourage parallel work
    • Besides tests, how could people help?
      • Unsmudging? Maybe too tricky
    • Mention that contributions other than fetchTree get less attention
  • @roberth: fetchTree attribute parsing: Currently fetchTree is just acting on attributes, would be good to have an actual struct for this

Tag 2.3.17 from `2.3-maintenance` branch · Issue #9244 · NixOS/nix · GitHub

Git hashing

  • @Ericson2314: trying to fix git hashing, will provide some more tests for the rewrite
4 Likes