!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

891 Members
For people hacking on the Nix package manager itself189 Servers

Load older messages


SenderMessageTime
20 Feb 2025
@roberthensing:matrix.orgroberthclangd also seems confused22:19:57
@Ericson2314:matrix.orgJohn Ericson the generated header has to be generated in the (build dir mirror of the) directory 22:20:16
@Ericson2314:matrix.orgJohn Ericsonso if we want to ahve one list of headers we append to22:20:25
@emilazy:matrix.orgemily couldn't fs.copyfile solve that? 22:20:33
@Ericson2314:matrix.orgJohn Ericsonwe do need to have that nix/meson.build22:20:36
@Ericson2314:matrix.orgJohn EricsonI think the dest of fs.copyfile must abide by the same rule?22:20:55
@roberthensing:matrix.orgroberthmight have done that with a mix of gcc and clang. retrying with clang only22:22:44
@roberthensing:matrix.orgroberthoh same22:22:54
@roberthensing:matrix.orgroberthok, was perhaps premature to test. Will try again tomorrow?22:25:26
@Ericson2314:matrix.orgJohn Ericson sorry about that, it worked for me! 22:32:31
@Ericson2314:matrix.orgJohn Ericsonit was the last thing I fixed, however22:32:59
@roberthensing:matrix.orgroberthnp. I shouldn't complain22:33:01
@Ericson2314:matrix.orgJohn Ericson src/libutil/nix/meson.build is config_h defined in there? 22:33:06
@roberthensing:matrix.orgroberthseems so22:33:40
@Ericson2314:matrix.orgJohn EricsonI'll clean and start again22:33:57
@Ericson2314:matrix.orgJohn Ericsonah, reproduced it now22:37:42
@emilazy:matrix.orgemily John Ericson: I believe you do want <nix/…> because that will suppress warnings for the headers 23:03:38
@emilazy:matrix.orgemily(don't quote me on this though)23:03:42
@Ericson2314:matrix.orgJohn Ericson emily: OK 23:04:58
@Ericson2314:matrix.orgJohn Ericson I just did "..." caux lix did heh 23:05:06
@Ericson2314:matrix.orgJohn EricsonI do think once it is installed, it is a "system header"23:05:20
@Ericson2314:matrix.orgJohn Ericsonso it certainly it should be <,..>23:05:53
@Ericson2314:matrix.orgJohn Ericson * so it certainly it should be <....> 23:06:00
@Ericson2314:matrix.orgJohn EricsonIMO a <....> is undeused23:06:07
@emilazy:matrix.orgemilyyes, I just forget whether "system headers" can use non-system includes to include other system headers without issues or not23:06:22
@Ericson2314:matrix.orgJohn Ericsonfrom the perspective of owns own project, it is weird, but headers are not for that perspective!23:06:28
@Ericson2314:matrix.orgJohn Ericson emily: Robert Hensing (roberth) OK it should work now 23:15:59
@roberthensing:matrix.orgroberthmeson is compiling, clangd is happy 🎉23:30:37
21 Feb 2025
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @emilazy:matrix.org
(don't quote me on this though)

I don’t think that’s how it works. ”…” and <…> only affect default search path preferences https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html. I our case this distinction does not make a difference.

To disable warnings you have to include directories via -isystem and not via -I.

For reference, Cmake does that with SYSTEM flag in target_include_directories:

https://cmake.org/cmake/help/latest/command/target_include_directories.html

Some discussions about meson’s handling of system includes: https://github.com/mesonbuild/meson/issues/963

https://github.com/mesonbuild/meson/pull/5953

Barring some unforeseen differences around search path preferences/order shenanigans it really doesn’t matter semantically.

I think in general the de-facto rule/convention is to refer to one’s own headers with quotes to highlight to the reader that it’s part of the same project and not an external library.

06:00:51
@alexandi:matrix.orgalexandi joined the room.06:52:57

Show newer messages


Back to Room ListRoom Version: 6