Download raw body.
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database
On 10/07/2024 22:11, Корякин Артём wrote:
> Fabien Romano <fabienromano@gmail.com> writes:
>
>> Please see previous thread.
>>
>> https://marc.info/?l=openbsd-ports&m=171472517500931&w=2
>
> Thanks a lot!
> It is such a nice feeling of realising that there are other people
> working on the same port.
Thanks to bring it back on the workbench.
> I would be very glad to cooperate, especially if using git for
> ${PORTSDIR}/mystuff would be possible.
Why do you need clangd in the first place ? For the base system ?
You tried ctags ? https://www.openbsd.org/faq/faq5.html#Miscellanea
I have to find a way to make all those tags as I do not have enough disk space
atm. I'm just asking myself what clangd bring compared to what already exists in
base system. I already tried clangd with more or less success (mainly because of
the huge amount of memory it needed during my test).
Otherwise clangd is usefull to work on ports, I also tried it with
compile_commands.json from ninja / cmake+ninja and that was easy to setup.
With compiledb its easy to setup for base system also.
>> Same tgz attached. Maybe it also need your patches/patch-setup_py.
>> More tests needed, I supose.
>
>> Index: setup.py
>> --- setup.py.orig
>> +++ setup.py
>> @@ -37,7 +37,8 @@ setup(
>> install_requires=[
>> 'click',
>> 'bashlex',
>> - 'shutilwhich'
>> +# Module shutil is already present in latest python interpreters from ports
>> +# 'shutilwhich'
>> ],
>> extras_require={
>> 'dev': [],
>>
>
> patches/patch-setup_py is only needed to not to create third port for
> package shutilwhich which is needed for python3.6, but not for the modern
> python3.11 in OpenBSD 7.5 or current, there is which function in the module
> shutil already.
I was thinking I had a hidden dependency already installed before the build. The
previous port built without this specific patch so I'm not sure why it built
without. It looks like a dependency setuptools would need (don't know enough),
but it worked without this patch when I tried Mikhail port.
Anyway, I think its cleaner with.
> I tried to submit it as a patch to upstream:
> https://github.com/nickdiego/compiledb/pull/137
>
> But it's failed tests because upstream tests are still configured to
> python3.6
I hope someday it will be merged.
> And I am not sure that this repo is abandoned, but rather seems to be finished
> to some extent.
I have the same feeling.
> I am writing this response not from the OpenBSD side of my laptop,
> though, so I couldn't say much right now.
>
> Althought If topic of compilation databases for clangd seems to be
> interesing for someone and they are don't wont to wait for this port
> comming in the tree there are also this script[1] from Lainchan that can be
> tested.
>
> [1]: https://lainchan.org/λ/res/31244.html#37440
> [1]: https://lainchan.org/%CE%BB/res/31244.html#37440
Looks harder to use, you need to override compile commands.
See Mikhail readme for a simple example with compiledb.
To play with clangd I would recommend compiledb port.
Building a port is not that hard, less convenient but workable.
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database
[NEW/wip]: compiledb —— tool for generating Clang's JSON Compilation Database