- 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 2 commits
-
-
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
It covers the bases on reading, and has a NodeBuilder which works to create new nodes based on the type-level structure. (Quite a few other things about it are incomplete, and it might end up getting merged this way, because the goal here was primarily to scope out if any of our abstractions will shatter badly, and we've now got information on that.) This seems to indicate we are indeed on the right track, regarding some of those comments in the codegeneration work in the previous commit: check out the 'Representation' method. Yep -- we've got multiple nodebuilders in our future. Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 20 Jul, 2019 1 commit
-
-
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 1 commit
-
-
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.
-
- 25 Jun, 2019 1 commit
-
-
Eric Myhre authored
- `typed.Node` -> now lives in the `impl/typed` package, more like other nodes. - Most of the other essential parts of reasoning about types moved to `schema` package. ("typed.Type" seemed like a nasty stutter.) - `typed.Universe` renamed to `schema.TypeSystem`. - Current `Validate` method moved to `schema` package, but see new comments about potential future homes of that code, and its aspirational relationship to `typed.Node`. Conspicuously *not* yet refactored or moved in this comment: - The `typed/declaration` package -- though it will shortly be scrapped and later reappear as `schema/ast`. The dream is that it would be neatest of all if we could generate it by codegen; but we'll see. (This would seem to imply we'll have to make sufficient exported methods for creating the `schema.Type` values... while we also want to make those immutable. We'll... see.) - The `typed/gen` package is also untouched in this commit, but should similarly move shortly. The codegen really ought to be built against the `schema.Type` reified interfaces. Overall, this drops the sheer nesting depths of packages a fair bit, which seems likely to be a good smell.
-