27 Feb 2024 |
K900 ⚡️ | And just removing the outer dict layer is a trivial change that will be caught by mypy | 19:49:15 |
Alyssa Ross | Do you mean the deprecation that I undid a year ago, or a different one? https://github.com/nixos/nixpkgs/commit/845576aac4c067b816886d5ef55aaec82ea37c17 | 19:50:59 |
K900 ⚡️ | https://github.com/NixOS/nixpkgs/blob/b5c956262d950cd2accccbe6a1e7fe768d5efaad/nixos/lib/test-driver/test_driver/machine.py#L382-L386 | 19:54:04 |
K900 ⚡️ | This one | 19:54:05 |
K900 ⚡️ | Which is still there and 3 years old | 19:54:21 |
Alyssa Ross | oh, so is it already possible to get equivalent functionality without passing a dict with startCommand? | 19:55:47 |
K900 ⚡️ | Not quite | 19:57:15 |
K900 ⚡️ | It's stupid | 19:57:19 |
K900 ⚡️ | It takes a dict | 19:57:21 |
K900 ⚡️ | Always | 19:57:23 |
K900 ⚡️ | But if the dict has startCommand , it'll use that | 19:57:33 |
K900 ⚡️ | And if it has anything else, it'll use THAT THING | 19:57:41 |
Alyssa Ross | Then I'm not sure this deprecation warning counts? If there was no possible way to get that functionality without using startCommand… | 19:58:18 |
Alyssa Ross | What I mean is that, I don't think we can expect users to have followed an unactionable deprecation warning. | 19:58:46 |
K900 ⚡️ | No | 19:59:40 |
K900 ⚡️ | I mean | 19:59:43 |
K900 ⚡️ | If you do create_machine({"startCommand": "..."}) | 19:59:52 |
K900 ⚡️ | You don't get the warning | 19:59:55 |
K900 ⚡️ | And you get the right thing done | 20:00:01 |
Alyssa Ross | Oh, I see. | 20:00:15 |
K900 ⚡️ | And after my PR you just need to change that to create_machine(start_command="...") now | 20:00:20 |
Alyssa Ross | That makes more sense —-I thought I'd have seen the warning. | 20:00:26 |
Alyssa Ross | Right | 20:00:30 |
K900 ⚡️ | But if you do create_machine({"hda": "foo.qcow2"}) or whatever | 20:00:37 |
K900 ⚡️ | That would get you the warning | 20:00:44 |
Alyssa Ross | Right | 20:00:48 |
K900 ⚡️ | And now it would blow up | 20:00:49 |
Alyssa Ross | Yeah I agree the non-startCommand keys don't need a deprecation period then. | 20:01:06 |
Alyssa Ross | The reason to do a deprecation period is usually to make it possible to have some code that works with both stable and unstable. | 20:01:34 |
K900 ⚡️ | I guess that's true | 20:01:45 |