| 20 Sep 2025 |
Alyssa Ross | yep, doesn't look like it… | 18:53:47 |
emily | as in it's just using the bindgen CLI? | 18:54:12 |
emily | and our hook breaks the CLI? | 18:54:16 |
Alyssa Ross | yeah | 18:54:16 |
emily | ah, pkgs/development/tools/rust/bindgen/wrapper.sh | 18:54:32 |
Alyssa Ross | (yeah, it's just using the bindgen CLI) | 18:54:36 |
emily | it seems like we should make our hook and our wrapper not break each other | 18:54:42 |
emily | bindgenHook should surely at worst be a nop | 18:54:42 |
Alyssa Ross | yes, but separately, it shouldn't be there | 18:54:57 |
emily | we could drop our wrapper, and rely only on the hook to make the unwrapped CLI work | 18:54:58 |
emily | or we could make our wrapper detect the hook and overwrite or not duplicate its work | 18:55:09 |
emily | (I of course prefer the solution with less wrapper) | 18:55:23 |
emily | (the CLI could propagate the hook) | 18:55:29 |
Alyssa Ross | or we could just not allow both of them to be used at once, because it's always going to be a mistake… | 18:55:30 |
emily | is it? | 18:55:36 |
emily | what if your build uses the crate in one place but the CLI in another? | 18:55:43 |
Alyssa Ross | that would be very, very strange | 18:55:52 |
emily | builds are weird :) | 18:56:00 |
emily | it seems entirely possible with vendored deps | 18:56:04 |
dramforever | i wonder if there's a way to get bindgen to dump the full command line | 18:56:17 |
Alyssa Ross | if you were vendoring the crate you'd have no reason to use the CLI | 18:56:19 |
emily | I mean, you have AwesomeBrower3000 | 18:56:41 |
emily | it has a copy of Mesa in it and also a copy of some Rust program that uses build.rs | 18:56:41 |
emily | and it builds both. (put aside that this is horrible.) | 18:56:53 |
emily | then you want the CLI and the hook. | 18:56:54 |
dramforever | should "duplicate work" even matter though | 18:56:58 |
emily | yes because #include_next + duplicate -isystem | 18:57:08 |
dramforever | like does duplicate include paths actually affect #include_next | 18:57:11 |
dramforever | oh | 18:58:08 |
dramforever | it does... | 18:58:12 |