| 20 Feb 2025 |
archercatneo | There's something I was wondering on why it's not done but why couldn't we in step 1 of compilation copy all *.hh files to $dev/include/nix then in the actual compilation do -I $dev/include (and if $dev is not avalible just use the normal meson artifacts dir) | 18:47:02 |
John Ericson | I mean I would not be opposed to backporting the change to get rid of the header polution to 2.26 | 18:47:03 |
emily | as in, <shared.hh> is already taken over anyway, so no point to avoid that by doing <nix/shared.hh> | 18:47:08 |
emily | sure, I think it should be fixed | 18:47:23 |
emily | I don't think I'll be able to allocate time to fixing it myself as I haven't dived into the Nix Meson build and anyway it sounds like there are constraints I don't fully understand preventing what seems like the simple/correct solution to me :) | 18:47:48 |
John Ericson | the simple correct solution being just make an include/nix dir in the source code? | 18:48:18 |
emily | how does this actually work within the Nix build? | 18:48:21 |
emily | how can the libraries see each other's headers? | 18:48:25 |
emily | do they consume the generated .pc files internally? | 18:48:31 |
John Ericson | regular meson deps | 18:48:34 |
John Ericson | no they don't consume the pc files internally sadly | 18:48:46 |
emily | and Meson just adds the entire source tree of every library to the include path of downstream ones? | 18:48:50 |
John Ericson | this is IMO some design debt in Meson I've been meaning to talk to them about | 18:48:53 |
John Ericson | include_directories pc file generation, and internal depedency overriding should all be unified | 18:49:27 |
John Ericson | but they are not yet in meosn | 18:49:34 |
John Ericson | * but they are not yet in meson | 18:49:36 |
emily | (well, one dir per library, but yes) | 18:49:38 |
emily | (this seems wild to me if true) | 18:50:18 |
John Ericson | no no it doesn't do that | 18:52:56 |
John Ericson | let me check | 18:53:05 |
John Ericson | cause I forget | 18:53:08 |
John Ericson | emily: look at nix-meson-build-support/export/meson.build | 18:53:45 |
John Ericson | see how declare_dependency has include_directories in it? | 18:54:19 |
emily | ok, and include_dirs is defined as include_dirs += [include_directories('.')] in the various libraries | 18:55:35 |
emily | so in practice this is exactly what's happening | 18:56:05 |
emily | but at least it's not Meson doing it out of the box I guess | 18:56:06 |
John Ericson | emily: oh and install_headers, another hack on their end | 18:58:44 |
John Ericson | oh sorry I see what you mean now | 18:59:14 |
John Ericson | yes Lix and us are both doing that haha | 18:59:25 |
John Ericson | they put their source code in lix/libutil/ | 18:59:35 |