1. 16 Aug, 2021 1 commit
  2. 29 Jul, 2021 1 commit
  3. 25 Dec, 2020 1 commit
    • Daniel Martí's avatar
      all: rename schema.Kind to TypeKind, ipld.ReprKind to Kind · 2d7d25c4
      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.
      2d7d25c4
  4. 26 Jun, 2020 1 commit
  5. 30 Aug, 2019 1 commit
    • Eric Myhre's avatar
      Move selector.PathSegment up to ipld.PathSegment. · fc1f83d7
      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: default avatarEric Myhre <hash@exultant.us>
      fc1f83d7
  6. 12 Aug, 2019 1 commit
    • Eric Myhre's avatar
      Node traversal(->lookup) method renames. · 2e3868c1
      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: default avatarEric Myhre <hash@exultant.us>
      2e3868c1
  7. 06 Aug, 2019 3 commits
  8. 16 Jul, 2019 2 commits
    • hannahhoward's avatar
      test(selectors): add selector unit tests · c590adc1
      hannahhoward authored
      Adds unit test of each type of selector to check parsing and functionality. Also includes some fixes
      discovered while creating unit tests
      c590adc1
    • hannahhoward's avatar
      feat(selectors): update existing to spec · 94020ba3
      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.
      94020ba3