- 30 Aug, 2019 1 commit
-
-
Eric Myhre authored
ipldfree.Node is now a much better implementation of Node. In particular, this means it will work correctly when combined with the typed.Node wrapper implementations which expect to be able to use ErrNotExists for logic purposes. Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 13 Aug, 2019 1 commit
-
-
Eric Myhre authored
In general, picking a consistent strategy with this error and sticking with it. The strings were starting to accumulate too much ~stuff~, otherwise. It might not be a bad idea to upgrade the MethodName strings to a bunch of consts, but I don't think it will get any harder to do that in the future if we should so choose either, so, meh. Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 12 Aug, 2019 3 commits
-
-
Eric Myhre authored
Signed-off-by: Eric Myhre <hash@exultant.us>
-
Eric Myhre authored
Signed-off-by: Eric Myhre <hash@exultant.us>
-
Eric Myhre authored
Most important things first! To follow this refactor: ``` sed s/TraverseField/LookupString/g sed s/TraverseIndex/LookupIndex/g ``` It is *literally* a sed-refactor in complexity. --- Now, details. This has been pending for a while, and there is some discussion in https://github.com/ipld/go-ipld-prime/issues/22 . In short, "Traversal" seemed like a mouthful; "Field" was always a misnomer here; and we've discovered several other methods that we *should* have in the area as well, which necessitated a thought about placement. In this commit, only the renames are applied, but you can also see the outlines of two new methods in the Node interface, as comments. These will be added in future commits. Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 11 Aug, 2019 1 commit
-
-
Eric Myhre authored
Leaving as a comment for now because it's not at the top of the priority-heap of refactors I want to chase right now. Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 20 Jul, 2019 2 commits
-
-
Eric Myhre authored
A bit fun; wish there was a way to compress that block of ifdefs about optional vs nullable stuff, but so far nothing clearer has emerged. Added ErrIteratorOverread while at it. Should refactoring other node types to use it too, I suppose. But perhaps we'll just accumlate those todos for a while, since there's already one other error refactor with a chain of blocks in front of it.
-
Eric Myhre authored
The latter isn't used yet; that's not the main goal of this branch (and I think I'd rather do the refactor to use ipld.ErrNotExists after moving the PathSegment types from the selector package into the root... which in turn I'm not going to do while some of the other current work on Selectors is in progress in other branches. So! Latur.); I just wanted it around for documentation and clarity of intent. This also adds a couple of other dummy references to the 'typed' package. I know keeping a set of packages-used-in-this-file is a common step in the development of codegen systems targetting golang, but I'm going to try to avoid it until the need is really forced.
-
- 10 Jul, 2019 2 commits
-
-
Eric Myhre authored
typed.Node.Representation(), which returns another Node, should address most of the infelicies we've found so far in trying to plan nice code that works over the schema layer. Also added in this comment: ipld.ReprKindSet, primarily for use in the ErrWrongKind error. It comes up often enough we might as well formalize the thing.
-
Eric Myhre authored
It's high time we got started on well-typed errors; and this type name is already hinted at by the codegen outputs, so let's make it real. This file has been hanging around on my disk uncommitted for a fair while, and some of the comments about review-needed are stale, but I'm keepin' em for historical interest. I think I have fixes planned that will straight out all of them.
-