Re:Ask HN: Good practices for my first C project
by Conscat on Wednesday October 18, 2023 @03:32PM
(#37933614)
I don't like bear. If you want to update the compilation database with it, you have to do a clean build. Most build systems can generate the database without a clean build, and most compilers can generate it, so I don't see much use in bear, personally.
[ Parent
| on HN ]
Re:Ask HN: Good practices for my first C project
by gavinhoward on Wednesday October 18, 2023 @03:35PM
(#37933652)
Fair enough.
Re:Ask HN: Good practices for my first C project
by synergy20 on Wednesday October 18, 2023 @05:10PM
(#37934818)
how? cmake can do it, so does compiledb, but that's about it in addition to bear?
some makefile based build codebase can not build compile_commands.json at all, I had to use the old ctags way to jump around, as clangd could not understand the code(e.g. it can find header definitions, but could not find function implementations in other non-header source files)
Re:Ask HN: Good practices for my first C project
by Conscat on Wednesday October 18, 2023 @06:15PM
(#37935500)
Clang itself can do it, as can forks of Clang, so can Xmake, Meson, and Ninja, as well as Clang Power Tools for Visual Studio.
Re:Ask HN: Good practices for my first C project
by synergy20 on Wednesday October 18, 2023 @10:04PM
(#37937383)
clangd can barely do it in practice, it does not index the whole code base, instead it builds up the index gradually, and it often failed to find function implementation, it can just find those definitions, ctags has no issues to find both.
I would love to stick with clangd if it can do whatever ctags can as far as source indexing goes, it seems can not.