- 22 Aug, 2021 1 commit
-
-
tavit ohanian authored
-
- 16 Aug, 2021 1 commit
-
-
tavit ohanian authored
-
- 29 Jul, 2021 1 commit
-
-
tavit ohanian authored
-
- 25 Dec, 2020 1 commit
-
-
Daniel Martí authored
As discussed on the issue thread, ipld.Kind and schema.TypeKind are more intuitive, closer to the spec wording, and just generally better in the long run. The changes are almost entirely automated via the commands below. Very minor changes were needed in some of the generators, and then gofmt. sed -ri 's/\<Kind\(\)/TypeKind()/g' **/*.go git checkout fluent # since it uses reflect.Value.Kind sed -ri 's/\<Kind_/TypeKind_/g' **/*.go sed -i 's/\<Kind\>/TypeKind/g' **/*.go sed -i 's/ReprKind/Kind/g' **/*.go Plus manually undoing a few renames, as per Eric's review. Fixes #94.
-
- 30 Aug, 2019 1 commit
-
-
Eric Myhre authored
ipld.Path is now a slice of ipld.PathSegment instead of strings. This should be an improvement in sanity: there are now several fewer places importing "strconv", and that's just always a good thing. We will also be free in the future to add PathSegment-based accessor methods to ipld.Node, as has already been commented as a desire; and, to use PathSegment in building better typed errors (which is the specific thing that provokes this diff today and now). The implementation of PathSegment is now also based on a struct-style union rather than an interface style union. There are comments about this in the diff. I do not wish to comment on how much time I've spent looking at golang assembler and runtime internals while trying to find a path to a more perfect compromise between ergonomics and performance. tl;dr Selectors will probably get faster and trigger fewer allocations; ipld.Path will probably take slightly more memory (another word per path segment), but not enough to care about for any practical purposes. I did not attempt to hoist the SegmentIterator features from the selector package to anywhere more central. It may be a fine idea to do so someday; I just don't presently have a formed opinion and am not budgeting time to consider it today. Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 06 Aug, 2019 5 commits
-
-
hannahhoward authored
Improve the traverse function so that it only explores relevant fields for low cardinality selectors and traverses high cardinality selectors for lists correctly
-
hannahhoward authored
Extract the selector buidler to a seperate package
-
hannahhoward authored
Rename SelectorContext to ParsedParent (more accurate) and put in a ParseContext state object which is tracked w/o var args
-
hannahhoward authored
Support validating recursive selectors to match ExploreRecursive with ExploreRecursiveEdge
-
hannahhoward authored
An initial implementation of recursive selectors that offers a way to traverse them. Not covered is validating ExploreRecursiveEdge being under an ExploreRecursive selector
-
- 16 Jul, 2019 1 commit
-
-
hannahhoward authored
- Update existing selectors so they are current with the specification. - Also add early implementations of ExploreIndex and ExploreRange. - Add an early implementation of Explore for ExploreUnion. - Add constants for field keys.
-
- 29 Apr, 2019 1 commit
-
-
Eric Myhre authored
This is a draft. There's a LOT of hard design choices which are not yet completely settled here. Corresponding updates to the ipld/specs repo will be coming soon: these implementations match a very recursive concept of selectors. (https://github.com/ipld/specs/pull/116 is roughly this.) There's so many things to go over, here. - selectors at all - selectFields is kind of a special case of unions - selectPath as a concept is gone; is a degenerate case of selectFields - we've added some new methods to help narrow down search spaces - we have serial selector spec parsers...! (very hand-rolled.) - the idea of always reporting candidates vs definite match parents is dropped for now; it requires a different algo with different performance characteristics, so, we'll do it as such -- later. - we ended up with unions being *in*! They're going to be used internally by a bunch of other things -- see comment blocks in the code about that (tl;dr recursives imply a need of unions). More docs will be coming in future commits; this is just a checkpoint of the progress. Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 21 Mar, 2019 1 commit
-
-
Eric Myhre authored
We now have both MapIterator and ListIterator interfaces. Both return key-value (or index-value) pairs, rather than just keys. List iterators may seem a tad redundant: you just loop over the length, right? Well, sure. But there's one place a list iterator shines: selecting only a subset of elements. And indeed, we'll be doing exactly that in the traversal/selector package; therefore, we definitely need list iterators. We might want keys-only iterators again in the future, but at present, I'm deferring that. It's definitely true that we should have iterators returning values as a core feature, since they're likely to be more efficiently supportable than "random" access (especially when we get to some Advanced Layout data systems), so we'll implement those first. Additionally, note that MapIterator now returns a Node for the key. This is to account for that fact that when using the schema system and typed nodes, map keys can be more *specific* types. Such nodes are still required to be kind==ReprKind_String, but string might not be their *preferred* native format (think: tuples with serialized to be delimiter-separated strings); we need to account for that. (MapBuilder.Insert method already takes a Node parameter for similar reasons: so it can take *typed* nodes. Node.TraverseField accepting a plain string is the oddball out here, and should be rectified.) Signed-off-by: Eric Myhre <hash@exultant.us>
-
- 08 Mar, 2019 1 commit
-
-
hannahhoward authored
-
- 14 Feb, 2019 1 commit
-
-
Eric Myhre authored
Outline of Traverse* funcs; comment about link loaders in TraversalConfig; confession of working draft of Selector interface; fixed typo in AdvVisitFn return types. Yes, that's lot of things heaped in one commit. Yes, (unfortunately,) they're all related. Almost the entirety of this has to manifest *at once*, all seamlessly connected, for any part of it to get off the ground. Note how very much is handwaved in the comments about TraversalConfig having linkloader tools of some kind. There's a lot to unpack there. Getting it to work well, and let users of the library supply functions that customize the parts that are interesting to the user, while *not* getting them hamstrung by a bunch of details about multicodecs and multihashing (unless they want to!)... requires careful design work. Signed-off-by: Eric Myhre <hash@exultant.us>
-