| 7 May 2023 |
raitobezarius | I just need to reuse my structure? | 22:00:52 |
raitobezarius | or is this because of consumption? | 22:00:57 |
figsoda | In reply to @raitobezarius:matrix.org
let Some(Prompter::Build(choices)) = editor.helper_mut() else {
unreachable!();
};
2 lines above set_helper takes ownership of choices, this is taking it back | 22:01:34 |
raitobezarius | okay you're consuming it back | 22:01:47 |
raitobezarius | I won't do it this way | 22:02:01 |
raitobezarius | It's a bit ugly | 22:02:04 |
figsoda | yeah | 22:02:09 |
raitobezarius | I will clone the choices to map them into String | 22:02:11 |
raitobezarius | And I will reuse the PathBuf list to pass them to src_dir | 22:02:20 |
raitobezarius | to avoid reconverting back to PathBuf | 22:02:24 |
raitobezarius | now I only need to propagate sourceRoot attr to the drv | 22:02:43 |
raitobezarius | I just stumbled on the write phase :D | 22:04:39 |
figsoda | the whole code generation is a giant blob of rust code mixed with nix code :x | 22:05:48 |
raitobezarius | I don't even know how to filter out sourceRoot = "source/"; | 22:05:58 |
raitobezarius | In reply to @figsoda:matrix.org the whole code generation is a giant blob of rust code mixed with nix code :x rnix when | 22:06:05 |
figsoda | I'm not sure about using rnix for code generation | 22:06:39 |
raitobezarius | why? | 22:06:43 |
figsoda | maybe its own structure | 22:06:48 |
raitobezarius | what do you mean by "its own structure"? | 22:06:57 |
raitobezarius | afaik rnix was built also for codegen | 22:07:07 |
figsoda | In reply to @raitobezarius:matrix.org why? it's too complex for what nix-init does, and it makes formatting hard | 22:07:13 |
raitobezarius | even better, it can do codemod | 22:07:14 |
raitobezarius | In reply to @figsoda:matrix.org it's too complex for what nix-init does, and it makes formatting hard I see your point | 22:07:31 |
figsoda | In reply to @raitobezarius:matrix.org what do you mean by "its own structure"? something like this | 22:07:59 |
figsoda |  Download image.png | 22:08:01 |
figsoda | idk how I managed to reply to the same message twice without clicking reply twice | 22:08:20 |
raitobezarius | :D | 22:08:28 |
raitobezarius | In reply to @figsoda:matrix.org sent an image. but with your own custom formatter/writer? | 22:08:37 |
figsoda | yes | 22:08:49 |
figsoda | maybe the builder enum will be a static dispatch of a hook-styled trait | 22:10:17 |