Re:Greppability is an underrated code metric
by joe-six-pack on Tuesday September 03, 2024 @09:59AM
(#41435030)
You forgot massive codebases. Language servers really struggle with anything on the order of the Linux kernel, FreeBSD, or Chromium.
[ Parent
| on HN ]
Re:Greppability is an underrated code metric
by umanwizard on Tuesday September 03, 2024 @12:14PM
(#41436398)
clangd works fine for me with the linux kernel. For best results build the kernel with clang by setting LLVM=1 and KERNEL_LLVM=1 in the build environment and run ./scripts/clang-tools/gen_compile_commands.py after building.
Re:Greppability is an underrated code metric
by toprerules on Wednesday September 04, 2024 @12:26PM
(#41447557)
Ok, but now every time you switch commits you have to wait for clangd to reindex. Grepping in the kernel is just as fast and you can do it without running a 4GB+ process that takes 10+ minutes to index
Re:Greppability is an underrated code metric
by umanwizard on Wednesday September 04, 2024 @02:51PM
(#41449170)
Sure. I wasn't intending to claim that there is no reason to care about greppability. Just providing some tips about getting clangd to work with linux for those who might find that useful.
Re:Greppability is an underrated code metric
by Groxx on Tuesday September 03, 2024 @02:10PM
(#41437494)
I honestly suspect that the amount of time spent dealing with the issues monorepos cause is net-larger than the gains most get from what a monorepo offers. It's just harder to measure because it tends to degrade slowly, happen to things you didn't realize you were relying on (until you need them), and without clear ways to point fingers at the cause.
Plus it means your engs don't learn how to deal with open source code concerns, e.g. libraries, forking, dependency management. Which gradually screws over the whole ecosystem.
If you're willing to put Google-scale effort into building your tooling, sure. Every problem is solvable. Only Google does that though, everyone else is getting by with a tiny fraction of the resources and doesn't already have a solid foundation to reduce those maintenance costs.
Re:Greppability is an underrated code metric
by ants_everywhere on Tuesday September 03, 2024 @03:25PM
(#41438245)
The projects mentioned were all single projects with single repos
Re:Greppability is an underrated code metric
by Groxx on Tuesday September 03, 2024 @08:59PM
(#41440843)
Sure. But those are far from the only massive codebases out there, and many of the biggest are monorepos because sorta by definition they are the size of multiple projects.
Re:Greppability is an underrated code metric
by chipsrafferty on Thursday September 05, 2024 @04:55PM
(#41460336)
IMO the biggest problem with big projects is finding the right file and finding the right lines of code, so greppability is even more helpful with big repos.