Derivation Output should probably be an enum, use StorePath

#264
Opened by ericson2314 at 2023-04-01T01·34+00

See what we did in C++ Nix since 2.3: storing the path and output hash+mode in the fixed output case is denormalizing because the output path can be recomputed from the hash+mode. With an enum we can just store a hash+mode for the content-addressed (FOD) case, and just store an opaque store path for the input-addressed case. This is better.

Also we shouldn't use string for the output path, but a proper StorePath. If this gets in a way of computing input-addressed output paths we can use type parameters (I already started doing this for inputs in https://cl.tvl.fyi/c/depot/+/8412).

  1. This has been implemented in https://cl.tvl.fyi/c/depot/+/11001 and parents. Thanks pkolloch!

    flokli at 2024-02-21T11·40+00

  2. flokli closed this issue at 2024-02-21T11·40+00