lix/src
John Ericson cb5052d98f Revert "Revert "Use template structs instead of phantoms""
This is the more typically way to do [Argument-dependent
lookup](https://en.cppreference.com/w/cpp/language/adl)-leveraging
generic serializers in C++. It makes the relationship between the `read`
and `write` methods more clear and rigorous, and also looks more
familiar to users coming from other languages that do not have C++'s
libertine ad-hoc overloading.

I am returning to this because during the review in
https://github.com/NixOS/nix/pull/6223, it came up as something that
would make the code easier to read --- easier today hopefully already,
but definitely easier if we were have multiple codified protocols with
code sharing between them as that PR seeks to accomplish.

If I recall correctly, the main criticism of this the first time around
(in 2020) was that having to specify the type when writing, e.g.
`WorkerProto<MyType>::write`, was too verbose and cumbersome. This is
now addressed with the `workerProtoWrite` wrapper function.

This method is also the way `nlohmann::json`, which we have used for a
number of years now, does its serializers, for what its worth.

This reverts commit 45a0ed82f0. That
commit in turn reverted 9ab07e99f5.
2023-05-17 22:44:47 -04:00
..
build-remote Split comment, match with each variable 2023-05-08 10:08:01 -04:00
libcmd Make more string values work as installables 2023-05-15 09:03:38 -04:00
libexpr Merge pull request #8340 from NixOS/delete-commited-build-artifacts 2023-05-15 17:30:20 +02:00
libfetchers Fix hostRegex to accept hosts with a - 2023-05-03 18:59:44 -04:00
libmain nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
libstore Revert "Revert "Use template structs instead of phantoms"" 2023-05-17 22:44:47 -04:00
libutil Delete commited build artifacts 2023-05-15 10:50:33 -04:00
nix Also use long options in src/nix/*.md 2023-05-17 08:10:30 +01:00
nix-build nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
nix-channel Factor out the generation of the profile/channel directory 2023-03-23 10:22:42 +01:00
nix-collect-garbage Make nix-collect-garbage -d look into more places 2023-05-15 11:36:53 +02:00
nix-copy-closure Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
nix-env nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
nix-instantiate nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
nix-store Revert "Revert "Use template structs instead of phantoms"" 2023-05-17 22:44:47 -04:00
resolve-system-dependencies Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
toml11