diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-14 20:45:11 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-14 20:45:11 -0400 |
commit | ee420ac64e7d1f51f5abcb069dbe84cd6ff707ce (patch) | |
tree | 98668c4cdac6640aee90a86acd644aaad862bb71 /src/libstore/remote-store.cc | |
parent | 9e8f2090365a509656dead69bc91fb6615cf9d05 (diff) |
Legacy vs non-legacy `to_string`/`parse` for `DerivedPath`
As requested by @roberth, it is good to call out the specific instances
we care about, which is `!` for the RPC protocols, and `^` for humans.
This doesn't take advantage of parametricity as much, but since the
human and computer interfaces are good to decouple anyways (we don't
care if they drift further apart over time in the slightest) some
separation and slight duplication is fine.
Also, unit test both round trips.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index e128c3a29..b862902d1 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -90,12 +90,12 @@ void write(const Store & store, Sink & out, const ContentAddress & ca) DerivedPath read(const Store & store, Source & from, Phantom<DerivedPath> _) { auto s = readString(from); - return DerivedPath::parse(store, s); + return DerivedPath::parseLegacy(store, s); } void write(const Store & store, Sink & out, const DerivedPath & req) { - out << req.to_string(store); + out << req.to_string_legacy(store); } |