!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

858 Members
For people hacking on the Nix package manager itself186 Servers

Load older messages


SenderMessageTime
17 Jul 2025
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Yeah, it should be part of clang-tools-extra alongside clang-tidy, but nixpkgs build doesn't seem to have it for some reason.13:30:31
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py13:31:00
@fzakaria:one.ems.hostfzakariaClang-tidy bonanza!?17:41:18
@fzakaria:one.ems.hostfzakariasweet -- the IWYU is what i'm really after.17:41:28
@fzakaria:one.ems.hostfzakariaMakes navigating the codebase way easier.17:41:34
@fzakaria:one.ems.hostfzakariai'm going to try and take on another issue from FetchTree tonight and stream again... (I'm picking some easy ones for now)17:42:03
@qyliss:fairydust.spaceAlyssa RossIWYU is difficult for portable programs like Nix19:28:52
@qyliss:fairydust.spaceAlyssa RossOften the header something happens to be defined in for your platform isn't the one you should actually be including to be standards conformant and portable19:29:09
@qyliss:fairydust.spaceAlyssa Ross(If it's possible to exclude libc headers rthat would probably help)19:30:31
18 Jul 2025
@fzakaria:one.ems.hostfzakariaaren't we solving that with Nix ?02:45:02
@fzakaria:one.ems.hostfzakarialike... we own all the header up until glibc... there's nothing non-portable02:45:16
@emilazy:matrix.orgemilyNix runs on Linux and Darwin (and also to some extent FreeBSD, Windows, …)02:45:59
@emilazy:matrix.orgemilyso system header portability is still a concern (and has broken the build in the past)02:46:26
@fzakaria:one.ems.hostfzakariaaren't those controlled by IFDEF macros so it's still IWYU.. anyways I don't think 100% is necessary02:54:29
@fzakaria:one.ems.hostfzakariabut something more than today; I open any file and 1/2 of every include is either unused as per clangd or there's no include so it's difficult to follow the hierarchy02:54:53
@fzakaria:one.ems.hostfzakarialike aspirational02:55:01
@fzakaria:one.ems.hostfzakaria:)02:55:02
@fzakaria:one.ems.hostfzakariaI found this bug in Nix -- I sent a failing test case to capture it https://github.com/NixOS/nix/pull/13456 Dunno if we like having test cases that validate the failure mode -- albeit easy to flip02:56:26
@emilazy:matrix.orgemilyAlyssa means that including system headers can non-portably lead to the definition of a symbol that is only properly (portably) obtained by including a header that a standard specifies it's found in03:23:19
@emilazy:matrix.orgemilybecause of nested includes in the system headers etc.03:23:25
@emilazy:matrix.orgemilyat least a naive "redundant include checker" would complain about including both such headers, even if it is the correct thing for portability across platforms03:23:59
@fzakaria:one.ems.hostfzakariasure; still better than current model. You can special case the 10% rather than give up on the 90%15:08:38
@joerg:thalheim.ioMic92
In reply to @fzakaria:one.ems.host
sweet -- the IWYU is what i'm really after.
You mean the clang-tidy one? Works quite well on nix-eval-jobs
17:33:14
@joerg:thalheim.ioMic92
In reply to @qyliss:fairydust.space
IWYU is difficult for portable programs like Nix
Maybe that can be enabled somehow for nix header only?
17:34:34
@joerg:thalheim.ioMic92Same actually for platform specific header - could be a bit tedious though 17:35:25
@joerg:thalheim.ioMic92 @xokdvium:matrix.org: clang format stuff is good to go? 17:36:58
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I think so. The diff is good and the auto-rebase script seems to work well.17:37:33
@joerg:thalheim.ioMic92Okay. Hit it!17:38:04
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Done! No more range formatting. Yay!17:40:50
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Pinned an issue about the auto-rebase script: https://github.com/NixOS/nix/issues/1350218:02:18

Show newer messages


Back to Room ListRoom Version: 6