Skip to content

Commit

Permalink
Merge pull request #228 from ipld/v200
Browse files Browse the repository at this point in the history
Major refactor: extract datamodel package.

The branch name I originally used turns out to be melodrama.  It's not a big breaking change at all, due to heavy use of golang's "alias" features.

It's likely that the next time we do tag a release, it'll be v0.12.0 -- the even number denoting "smooth sailing during upgrade is expected".
  • Loading branch information
warpfork authored Aug 19, 2021
2 parents d7e93a8 + fa9bec0 commit 67a06f1
Show file tree
Hide file tree
Showing 268 changed files with 7,688 additions and 10,405 deletions.
8 changes: 4 additions & 4 deletions HACKME.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ effective instructions for how one could build a copy of that node, using
the same implementation details.

By example, if some node `n` was made as a `basicnode.plainString`,
then `n.Prototype()` will be `basicnode.Prototype__String{}`,
then `n.Prototype()` will be `basicnode.Prototype.String`,
and `n.Prototype().NewBuilder().AssignString("xyz")` can be presumed to work.

Note there are also limits to this: if a node was built in a flexible way,
the prototype it reports later may only report what it is now, and not return
that same flexibility again.
By example, if something was made as an "any" -- i.e.,
via `basicnode.Prototype__Any{}.NewBuilder()`, and then *happened* to be assigned a string value --
via `basicnode.Prototype.Any.NewBuilder()`, and then *happened* to be assigned a string value --
the resulting node will still carry a `Prototype()` property that returns
`Prototype__String` -- **not** `Prototype__Any`.
`basicnode.Prototype.String` -- **not** `basicnode.Prototype.Any`.

#### NodePrototype meets generic transformation

Expand Down Expand Up @@ -102,7 +102,7 @@ and might be wrapped with additional rules (such as map key uniqueness, field
name expectations, etc).

(Note that it's also not an exclusive statement about what `AssignNode(Node)` will
accept; e.g. in many situations, while a `Prototype__MyStringType` might be the prototype
accept; e.g. in many situations, while a `Prototype.MyStringType` might be the prototype
returned, any string kinded node can be used in `AssignNode(Node)` and will be
appropriately converted.)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if you want to write your own extensions, whether for new Node implementations
or new codecs, or new higher-order order functions!)

- `github.com/ipld/go-ipld-prime` -- imported as just `ipld` -- contains the core interfaces for IPLD. The most important interfaces are `Node`, `NodeBuilder`, `Path`, and `Link`.
- `github.com/ipld/go-ipld-prime/node/basic` -- imported as `basicnode` -- provides concrete implementations of `Node` and `NodeBuilder` which work for any kind of data.
- `github.com/ipld/go-ipld-prime/node/basicnode` -- imported as `basicnode` -- provides concrete implementations of `Node` and `NodeBuilder` which work for any kind of data.
- `github.com/ipld/go-ipld-prime/traversal` -- contains higher-order functions for traversing graphs of data easily.
- `github.com/ipld/go-ipld-prime/traversal/selector` -- contains selectors, which are sort of like regexps, but for trees and graphs of IPLD data!
- `github.com/ipld/go-ipld-prime/codec` -- parent package of all the codec implementations!
Expand Down
15 changes: 0 additions & 15 deletions _rsrch/methodsets/base.go

This file was deleted.

26 changes: 0 additions & 26 deletions _rsrch/methodsets/crosspkg/isomorphicCast.go

This file was deleted.

28 changes: 0 additions & 28 deletions _rsrch/methodsets/viaAliases.go

This file was deleted.

15 changes: 0 additions & 15 deletions _rsrch/methodsets/viaTypedef.go

This file was deleted.

28 changes: 0 additions & 28 deletions _rsrch/methodsets/viaTypedef_test.go

This file was deleted.

22 changes: 0 additions & 22 deletions _rsrch/methodsets/viaUnsafe.go

This file was deleted.

28 changes: 0 additions & 28 deletions _rsrch/methodsets/viaUnsafe_test.go

This file was deleted.

36 changes: 0 additions & 36 deletions _rsrch/microbench/multihoisting/canhazptrcmp_test.go

This file was deleted.

Loading

0 comments on commit 67a06f1

Please sign in to comment.