Is Samba's compile_commands.json useful?

Andreas Schneider asn at samba.org
Wed Sep 15 16:51:50 UTC 2021


On Thursday, 9 September 2021 09:09:16 CEST Martin Schwenke via samba-
technical wrote:
> On Thu, 9 Sep 2021 06:49:52 +0200, Ralph Boehme <slow at samba.org> wrote:
> > Am 09.09.21 um 04:25 schrieb Martin Schwenke via samba-technical:
> > > What am I missing?
> > 
> > I also noticed this a few days ago when using lsp im emacs as well.
> > 
> > It seems it's a regression introduced by
> > 5d53b848f60efbb71e4cd2f51f33a06369ca9055. If I revert this change I get
> > a working compile database.
> > 
> > Looking...
> 
> Thanks!
> 
> That was one of the commits I took a brief look at while trying to
> understand the problem myself.  I didn't try reverting it.  I also
> didn't notice the new call to:
> 
>     Scripting.run_command('clangdb')
> 
> in buildtools/wafsamba/samba_deps.py the first time around.
> 
> Duplicating that from
> third_party/waf/waflib/extras/clang_compilation_database.py looks like
> it should do some deep magic... but it seems like it isn't quite working
> as expected.  Deep magic always deserves a comment to explain some
> subset of what, why and how... :-D

I've tried to fix with metze the issue that waf build fully regenerates the 
compile_commands.json event if nothing changed at all. The problem is that it 
fails to add the include path now.

However I'm on vacation till Sep 28th so it would be great if someone else 
could find a way to fix it or revert the commit.


	Andreas





More information about the samba-technical mailing list