Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major refactor: extract datamodel package. #228

Merged
merged 8 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
warpfork marked this conversation as resolved.
Show resolved Hide resolved
- `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