!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

416 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.139 Servers

Load older messages


SenderMessageTime
1 Aug 2025
@emilazy:matrix.orgemilysee my second paragraph :(16:36:54
@raitobezarius:matrix.orgraitobezariusok sorry :(16:37:01
@emilazy:matrix.orgemilyI really feel like there is a knowledge gap in how much simple merge tooling that Git supports as well as Jujutsu will resolve all formatting conflict issues automatically and that a small amount of documentation could resolve this, but I also understand that it's effectively not up for discussion16:37:27
@raitobezarius:matrix.orgraitobezariusbecause when you drum it too hard, I hear "let's make the experience great for jj users and for git… well doable but enjoy"16:37:27
@emilazy:matrix.orgemilyalright. I was replying to you talking about the Jujutsu workflow around this. if you had asked about Git I could have given that information too :)16:37:54
@raitobezarius:matrix.orgraitobezariusit's a risk aversion thing16:37:54
@raitobezarius:matrix.orgraitobezariusyeah what i was focusing on is "emilazy cannot format their diffs nicely with jj on lix contributions, so i will try jj and understand what is broken or what could be improved"16:38:29
@raitobezarius:matrix.orgraitobezariusand maybe write docs on how to use jj with lix and stuff16:38:35
@raitobezarius:matrix.orgraitobezariusif it's a one line config or something that can injected in the dev shell16:38:48
@emilazy:matrix.orgemily (fwiw: https://github.com/emilio/clang-format-merge/blob/master/clang-format-merge. shipping something of this complexity in the repo will make git mergetool automatically resolve all formatting conflicts) 16:39:38
@emilazy:matrix.orgemily

if it was this simple I already would have solved the issue and not chimed in re: WeetHet's problems

  1. there are no pre-commit hooks by design
  2. the current tooling to run fixers like formatters across commits, and to resolve formatting-related conflicts, is great but oriented around in-memory tools (whereas the partial Git stuff currently used can rely on doing a full slow checkout on each commit of a stack and computing the diff). (the partial reformatting regime means that this makes things harder for me even if I ignore formatting, because I can rebase over some code someone touched that then got reformatted and have conflicts that cannot be trivially resolved in one command due to the current scheme not formatting whole files)
  3. (I am often making changes with dumb editors and doing things in general weird ways so even if I set up editor hooks I would still want to be able to reliably check and fix a whole stack for formatting, especially since I am frequently squashing things from one commit to another and splitting commits etc.)

I think the options are using a colocated repository so the Git reformatter thing can work (and hoping that it works with detached HEAD) and rigorously ensuring I always have it get run by editors etc., or writing a manual slow script that checks out commits in sequence to fix them up and cannot easily be used to resolve conflicts unless I put in even more work

16:44:41
@emilazy:matrix.orgemily these are also not Jujutsu-specific problems, e.g. any use of git revise or git-branchless or Sapling will also not be getting pre-commit hooks 16:45:07
@emilazy:matrix.orgemily or even in 100% upstream Git, git replay which is faster than git rebase because it is in-memory 16:45:24
@raitobezarius:matrix.orgraitobezariusI don't understand why jj couldn't pass the diff to tools to fix up only certain hunks but ok16:45:55
@raitobezarius:matrix.orgraitobezariusbut understood16:46:32
@qyriad:katesiria.orgQyriad
In reply to @emilazy:matrix.org
these are also not Jujutsu-specific problems, e.g. any use of git revise or git-branchless or Sapling will also not be getting pre-commit hooks
we use git revise a lot. we have occasionally needed to manually reformat a commit because of it
16:46:50
@raitobezarius:matrix.orgraitobezarius Charles you have testing to do — https://gerrit.lix.systems/c/lix/+/3856 :P 16:46:54
@raitobezarius:matrix.orgraitobezarius ma27 thanks boss 16:47:55
@emilazy:matrix.orgemily

of course there is no fundamental reason (because you can do it with Git) but

  • computing hunk-level diffs is inherently expensive in a snapshot-based VCS like Git or Mercurial or Jujutsu; jj fix is very fast not just because it works in-memory because it specifically avoids having to do any diffing or rebasing of patches even when formatting an entire stack
  • the resulting interface to tooling is much more complex and difficult to standardize than providing the repo path and piping through stdin/stdout
  • most people working on modern developer tooling do not want to deal with partially-formatted codebases

so I do not find it surprising that there is no existing surface exposed for this

16:50:53
@emilazy:matrix.orgemily (like the fact that formatting is history-dependent is also why treefmt cannot be used for the C++ part of the codebase, it is just an awkward layering to expose to tooling) 16:52:40
@raitobezarius:matrix.orgraitobezariusI will take all of this home and think about it and do more homework16:52:45
@charles:computer.surgeryCharlesi could try to consolidate the conversation into an issue if that would be helpful, assuming the involved parties (raito and emily) are okay with that16:55:01
@charles:computer.surgeryCharlesprobably just copy+pasting the relevant/substantive bits directly from matrix lol16:55:22
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)FWIW cppnix codebase has been reformatted.16:56:02
@emilazy:matrix.orgemilyif you'd like to see such an issue I'll see if I have energy to put my thoughts in more organized form in a little while, if you'd like to save yourself the trouble16:57:14
@emilazy:matrix.orgemily(I just think it is only worth having an issue if there is a possibility that the information it contains could result in a changed decision)16:57:31
@charles:computer.surgeryCharlesi mean it seems like the chance is nonzero at least16:58:39
@raitobezarius:matrix.orgraitobezarius
In reply to @charles:computer.surgery
i could try to consolidate the conversation into an issue if that would be helpful, assuming the involved parties (raito and emily) are okay with that
yep, would be good
16:59:33
@raitobezarius:matrix.orgraitobezarius
In reply to @emilazy:matrix.org
(I just think it is only worth having an issue if there is a possibility that the information it contains could result in a changed decision)
I won't lie, I think the bar is very high for such a decision to happen
16:59:55
@raitobezarius:matrix.orgraitobezariusSo I don't want to be deceptive and snipe you17:00:00

Show newer messages


Back to Room ListRoom Version: 10