| 20 Feb 2025 |
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 |
John Ericson | and then they make the repo root the include path | 18:59:45 |
John Ericson | so everything, upstream and downstream libraries is in principle able to incldue | 18:59:59 |
John Ericson | meson has "targets", e.g. those produced by executable(..) and library(..) | 19:00:28 |
John Ericson | but they don't have any analogous notion for headers | 19:00:35 |
emily | I still think just libfoo/include/nix is the thing that makes sense. but if that's not an option, how about simply generating a nix/ with header files in it in Meson and having that be the downstream include directory used? | 19:00:52 |
emily | you can also use it for installing headers: simply install that generated thing | 19:00:59 |
emily | no symlinks in the source tree, should be pretty simple on the Meson end, and no .cc files in include paths | 19:01:10 |
emily | right now it seems like libraries can see headers from "downstream" libraries that they don't depend on too, which this would avoid | 19:01:25 |
John Ericson | it is just done with side effects instead like install_headers, making PC files, and include_directories , the logic is very balkanized between those 3 things which must stay in sync | 19:01:30 |
emily | (but I might be misreading that) | 19:01:33 |
emily | I guess https://mesonbuild.com/Generating-sources.html#generating-headers might not actually be fancy enough for this. not sure. | 19:02:04 |
John Ericson | I think this happens with Lix, but not us. since we do the include dirs once per dep | 19:02:37 |
John Ericson | you can do a fucked up #include "libutil-file.cc" | 19:02:46 |
John Ericson | but you cannot do a libexpr include from libstore | 19:02:57 |