Try   HackMD

Attendees: @layus @regnat …

Agenda:

Issue Review

Debugger

  • removed static ptr's
  • debugger hook as function? WIP

Copy local flakes

  • flake lock interaction?
  • will not be in 2.9.0

Nix repl

Error location improvement

Still waiting on the debugger PR

Flakes and Git integration

Problem: Nix takes into account the git repo it’s working in. Which can be nice, but also creates some friction and unintuitive behavior

  • @eelco’s work on lazy trees makes this nicer because it’s possible to display a better error message saying that the file exists but isn’t known to Git, so it should be checked-in

  • But not enough: Since Nix knows how to fix it, it could just fix it himself

  • Occasionnally, ppl want to use untracked files in a flake

  • Also means that adding a Git repo changes significantly the behavior of Nix

  • The behaviour is weird wrt the mental model of Git: The thing that Nix sees is the commit that would have been produced by git commit --all. Which isn’t intuitive at all

  • This decision isn’t documented anywhere

  • Motivations behind this design choice:

    • Tying Nix to Git is done for hermeticity
    • Copying everything to the store is (was) the easiest way to implement this hermetic model
  • Alternatives

    • Stick to the last commit
    • Only consider the staged chunks
    • Consider the whole non-ignored workspace
  • That boils down to a matter of Git wokflow:

    • Ppl who keep a clean worktree will prefer having everything (non-ignored) included
    • Other ppl prefer having to explicitely add stuff
  • Other use-case: people who can’t commit the flake.nix (or other Nix files) but still want to use the flakes in-tree

  • Proposal by @layus : Keep mostly the same behavior, except that when the evaluator wants to eval a file that’s not tracked in Git it should just warn about it and evaluate it anyways

Regardless of what ends-up being done, the motivation should be recorded

Topic for next time

Progress-bar (@garbas)