Move Path to the root package.
Yes, this one has moved about a bunch now. Hopefully this is the last time.
It's true and elegant that paths really only emerge as descriptions of traversal
progress; however, this misses a few other practicalities.
There are other kinds of traversal (other than the traversal package, whoa!) out
there: see the typesystem packages, which had grown a custom path implementation
simply for error reporting messages!
In general, we seem to want to have Path around for logging and errors, which
will make it increasingly desirable to have available in the root package when
we begin to clean up towards strongly typed errors.
And we also need Path for LinkContext -- and wherever that comes to rest, it
definitely need to not be an import cycle problem, which it *is* if Path is
in traversal and we wanted LinkContext to be *anywhere* else.
All of these point to moving Path back up to the root, and the errors concern
in particular cinches it.
Drop the Path.traverse method. As has been noted in its comment for a while
now, that method wasn't useful for much, having been replaced by features
in the traversal package.
(Also drop the tests specific to the Path.traverse method. We should write
more tests against the features now implemented by travesral.Focus... but at
this point, it'd be easier to start over. The tests we're dropping are against
a different model of traversal (returns rather than visitors) and are also
built against the old hacky ipldfree mutable model which is deprecated and
soon to be dropped.)
Also, a small docs fix: drop description of this Path implementation as a
"merklepath" -- it is not. These paths are all relative, and do not contain
an innate understanding of hashed object identifiers at their first segment.
Signed-off-by: Eric Myhre <hash@exultant.us>
Showing
Please register or sign in to comment